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 ...
随机推荐
- spring data jpa、Hibernate开启全球唯一UUID设置
spring data jpa.Hibernate开启全球唯一UUID设置 原文链接:https://www.cnblogs.com/blog5277/p/10662079.html 原文作者:博客园 ...
- js原型和原型链理解到面向对象
一.js中的两种对象,普通对象和函数对象 var obj1 = {}; var obj2 =new Object(); var obj3 = new obj1(); function fun1(){} ...
- 20175317 《Java程序设计》第九周学习总结
20175317 <Java程序设计>第九周学习总结 学前准备 首先下载XAMPP,下载完成后打开: 将前两个选项打开 在IDEA中配置驱动mysql-connector-java-5.1 ...
- #宽带选择# V2EX讨论
毫无疑问上海联通是最好的,如果你的小区有的话IP 基本上固定,只要你的路由器不掉线不断电我的 IP 已经 hold 了三个多月了.无论是北美 还是日韩新,联通(上海)出口都甩电信普通家宽 N 条街.如 ...
- idea 配置git
1.注册https://github.com 2. 3.填入信息完成
- Genymotion下载及安装
引用https://blog.csdn.net/yht2004123/article/details/80146989 一.注册\登录 打开Genymotion官网,https://www.genym ...
- Windos消息驱动
当Window是向程序发送消息时,它调用程序中的一个函数,这个函数用来描述Windows发送的消息,成为窗口函数或消息处理函数.他是一个自定义的回调函数: LRESULT CALLBACK Windo ...
- linux常用命令 wc统计命令
统计命令wc wc [选项] 文件名 选项 -l 只统计行数 -w 只统计单词数 -m 只统计字符数 192:linux_worspace aouo$ wc /etc/passwd 103 ...
- Linux c使用gumbo库解析页面表单信息(二)
一.如何在程序当中使用gumbo? 要想在代码中使用gumbo,仅仅包含gumbo头文件是不够的,必须在编译程序的时候加上-lgumbo选项,编译程序才会链接到gumbo库上面. 这是我编译gumbo ...
- QPS的优化
cdn加速 吧静态资源放到别人的服务器上 精灵图 后台数据库用mysql+redis sql的优化 用缓存 程序架构:集群化部署 ,分布式+异步 celery:分布式异步任务框架 语言