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 ...
随机推荐
- 他山之石,calling by share——python中既不是传址也不是传值
事情是这样的,Python里是传址还是传值令人疑惑,限于本人没有C基础,所以对大家的各类水平层次不一的解答难以确信. 第一个阶段: 在读<python基础教程第二版>的时候感到疑惑,然后群 ...
- Amazon 刷单的几种方式及安全性?
刷单需要注意的几个点 1.通过关键词,找产品.不要直接通过连接或者ASIN购买,容易被亚马逊监控. 2.添加购物车时最好添加同类产品表现好的三个到购物车,关联同类产品.在页面多浏览一下,多打开几个同类 ...
- Delphi【异常捕获以及Exe调用方法方法】
通过测试.exe程序调用dll外部方法,通过dll调用主程序.exe方法实现. Showmessage('进入方法?这里是dll里LoginElecReq'); try ShellExecute( ...
- opencv使用总结
在resize矩阵时出现报错 (-215) func != 0 in function cv::resize" 很可能是矩阵未设置为float,应该在读入后转换类型 item = item. ...
- Linux系统优化及基础命令
1.Linux系统优化及基础命令 2. vim编辑器 vim 操作命令 在命令模式下操作 pageup 往上翻页(重要指数****)pagedown 往下翻页(重要指数****)H 移动到屏幕首行gg ...
- hadoop知识点总结
(一).hadoop的内置数据类型都实现了writablecompareable,以便序列化和网络传输及文件存储 a自定义数据类型作为输入 1.实现writable接口 2.如果给数据需要比较大小时, ...
- PAT 1140 Look-and-say Sequence
1140 Look-and-say Sequence (20 分) Look-and-say sequence is a sequence of integers as the following ...
- nginx日志相关运维操作记录
在分析服务器运行情况和业务数据时,nginx日志是非常可靠的数据来源,而掌握常用的nginx日志分析命令的应用技巧则有着事半功倍的作用,可以快速进行定位和统计. 1)Nginx日志的标准格式(可参考: ...
- nginx配置文件详解----第一篇【访问与错误日志】
error_log错误日志 access_log访问日志 log_format指令 语法: log_format name string …;默认值: log_format combined “ ...
- 记一次tomcat运行起来了但是项目没起来的问题
解决办法是: 先是tomcat的conf文件夹下的servel.xml中这两个值改成false. 然后重新运行maven的package打包,再运行项目就行了.