1011. World Cup Betting (20)
生词(在文中的意思)
tie 平局 lay a bet 打赌 putting their money where their mouths were 把他们的钱用在刀刃上 manner of 的方式
odds 胜算 corresponding 对应的
这里有一个小问题要说一下,以下程序在自己电脑上运行样例显示结果为37.97,但提交正确。也许是运行环境不同。c++也有同样问题,可以参考此贴赵老师的回答。
http://bbs.csdn.net/topics/390486879
import java.util.Scanner; public class Main { public static void main(String[] args) {
// TODO Auto-generated method stub
double[][] a = new double[3][3];
Scanner sc = new Scanner(System.in);
double[] max = new double[3];
double result = 1;
int[] pos = new int[3];
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
a[i][j] = sc.nextDouble();
if (a[i][j] > max[i]) {
max[i] = a[i][j];
pos[i] = j;
}
}
if (pos[i] == 0) {
System.out.print("W ");
}
if (pos[i] == 1) {
System.out.print("T ");
}
if (pos[i] == 2) {
System.out.print("L ");
}
result *= max[i];
}
result = (result * 0.65 - 1) * 2;
System.out.printf("%.2f", result); } }
1011. World Cup Betting (20)的更多相关文章
- PAT 甲级 1011 World Cup Betting (20)(20 分)
1011 World Cup Betting (20)(20 分)提问 With the 2010 FIFA World Cup running, football fans the world ov ...
- PAT 甲级 1011 World Cup Betting (20)(代码+思路)
1011 World Cup Betting (20)(20 分) With the 2010 FIFA World Cup running, football fans the world over ...
- PAT甲 1011. World Cup Betting (20) 2016-09-09 23:06 18人阅读 评论(0) 收藏
1011. World Cup Betting (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Wit ...
- PAT 甲级 1011 World Cup Betting (20)(20 分)(水题,不用特别在乎精度)
1011 World Cup Betting (20)(20 分) With the 2010 FIFA World Cup running, football fans the world over ...
- PATA 1011 World Cup Betting (20)
1011. World Cup Betting (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Wit ...
- PAT (Advanced Level) Practice 1011 World Cup Betting (20 分) 凌宸1642
PAT (Advanced Level) Practice 1011 World Cup Betting (20 分) 凌宸1642 题目描述: With the 2010 FIFA World Cu ...
- 1011 World Cup Betting (20)(20 point(s))
problem With the 2010 FIFA World Cup running, football fans the world over were becoming increasingl ...
- 1011. World Cup Betting (20)(最大值)
With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excite ...
- PAT Advanced 1011 World Cup Betting (20 分)
With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excite ...
- PAT (Advanced Level) Practice 1011 World Cup Betting (20 分) (找最值)
With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excite ...
随机推荐
- 解决来自美国IP的攻击过程
1.因为最近接口文档confluence服务总是自动关闭. 解决方法: 1.查看阿里云上的报警提示,看到来自外国的Ip的攻击.这时我选择把攻击的IP加入黑名单. 加入黑名单的方法:https:// ...
- Log4net详细说明
1.概述 log4net是.Net下一个非常优秀的开源日志记录组件.log4net记录日志的功能非常强大.它可以将日志分不同的等级,以不同的格式,输出到不同的媒介.本文主要是介绍如何在Visual S ...
- leecode第二百三十五题(二叉搜索树的最近公共祖先)
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode ...
- java代理通俗简单解析
1 代理 1.1 代理的概念和作用 代理的概念很好理解,就像黄牛代替票务公司给你提供票,经纪人代理艺人和别人谈合作.Java的代理是指实现类作为代理类的属性对象, ...
- scrapyd的安装和scrapyd-client
1.创建虚拟环境 ,虚拟环境名为sd mkvirtualenv sd #方便管理 2. 安装 scrapyd pip3 install scrapyd 3. 配置 mkdir /etc/scrapy ...
- (JavaScript)实现上传图片实时预览和(文件)大小判断
唉,为什么我一个做大数据和后端的要为前端耗尽心力啊??!! 昨天在做一个网页时遇到了一个问题,有一处需要插入图片,我原本的想法是获取到上传文件的URL,然后动态插入img标签,设置src为图片的URL ...
- 搭建SDN网络——mininet
好久没来写不博客,感觉自己不写写博客,就完全想不起当天干了什么.前几天参加了小米的面试,整个人被打击的不行,还是要好好学习,不然工作都找不到. 这学期选了SDN的课,只有六周,学完有点懵,这这这等于什 ...
- Safari 里的javascript 里不能用submit作为函数名
Safari 里的javascript 里不能用submit作为函数名, 这样写的时候,怎么也运行不了JeasyUI的onSubmit的function, 改个名就可以了.而在chrome下面就没问题 ...
- TCP三次握手的思考?
大家都知道TCP有三次握手的过程,今天我就仔细想了想为什么TCP要有三次握手 先贴一张三次握手的示意图,说明一点是在三次握手中A是在第二次握手后申请缓存资源,B是在第一次握手后申请. 其实这个问题就是 ...
- elment重置表格行高,hover效果
来源网络,做个笔记.表头行高.el-table__header tr, .el-table__header th { padding: 0; height: 50px; }表体行高 .el-table ...