PAT 甲级【1011 World Cup Betting】
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.StreamTokenizer; public class Main {
@SuppressWarnings("unchecked")
public static void main(String[] args) throws IOException {
StreamTokenizer in = new StreamTokenizer(new InputStreamReader(System.in));
double ans = 1.0f;
char[] arr = new char[3];
for (int i = 0; i < 3; i++) {
double max = 0.0f;
char ch = 'W';
for (int j = 0; j < 3; j++) {
in.nextToken();
double v = in.nval;
if (v > max) {
max = v;
if (j == 0) {
ch = 'W';
} else if (j == 1) {
ch = 'T';
} else {
ch = 'L';
}
}
}
arr[i] = ch;
ans *= max;
}
System.out.println(arr[0]+" "+arr[1]+" "+arr[2]+" "+String.format("%.2f",(ans*0.65-1.0f)*2)); }
}
PAT 甲级【1011 World Cup Betting】的更多相关文章
- 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)(20 分)(水题,不用特别在乎精度)
1011 World Cup Betting (20)(20 分) With the 2010 FIFA World Cup running, football fans the world over ...
- PAT甲级——1011 World Cup Betting
PATA1011 World Cup Betting With the 2010 FIFA World Cup running, football fans the world over were b ...
- PAT 甲级 1011 World Cup Betting
https://pintia.cn/problem-sets/994805342720868352/problems/994805504927186944 With the 2010 FIFA Wor ...
- 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 Advanced 1011 World Cup Betting (20 分)
With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excite ...
- PAT甲级——A1011 World Cup Betting
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 分) 凌宸1642
PAT (Advanced Level) Practice 1011 World Cup Betting (20 分) 凌宸1642 题目描述: With the 2010 FIFA World Cu ...
- PAT 1011 World Cup Betting
1011 World Cup Betting (20 分) With the 2010 FIFA World Cup running, football fans the world over w ...
随机推荐
- Linux通过fdisk或者parted进行磁盘分区,然后格式化和挂载磁盘
磁盘分区是Linux的常用命令,其中fdisk和parted命令最为常用.但是当磁盘大于2T时,fdisk只能分到2T. 比如4T的磁盘,fdisk只能分2T的主分区出来,parted可以直接分成4T ...
- 测距工具部分情况下无效的问题解决 - 高德JSAPI
最近项目中新增了一个需求是在地图上新增一个测距工具,方便看一下距离 高德官方本身自带了有一个测距工具类的 RangingTool ,以插件的方式引入即可 问题一: 如果地图上有覆盖物的话(我这是 po ...
- Pandas练习
背景介绍 本数据集包括了2015年至2017年我国36个主要一线城市.特区的一些年度数据,包括产值.人口.就业.教育.医疗.经济贸易.房地产投资等方面. 包含文件: 2015年国内主要城市年度数据.c ...
- Swoole从入门到入土(3)——TCP服务器[基本配置项]
在这一节的开篇,让我们先解决上一节的"配置"话题.对于server对象,有很多配置项决定了服务端的行为,可以用set的函数进行配置的设置. 1.函数set:用于设置运行时的各项参数 ...
- Swoole从入门到入土(1)——入坑
入坑一个话题,总得有入坑的理由.有好多话题可供选择,但是思来想去,对于PHPer进阶与其急着去掌握一门新的语言,匆忙地踏足一个新的知识体系,还不如先把php圈子的技能点攒齐了. 话说Swoole诞生之 ...
- centos7安装postgresql9.6
1.安装yum源 yum install -y https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg- ...
- ysoserial URLDNS利用链分析
在分析URLDNS之前,必须了解JAVA序列化和反序列化的基本概念.其中几个重要的概念: 需要让某个对象支持序列化机制,就必须让其类是可序列化,为了让某类可序列化的,该类就必须实现如下两个接口之一: ...
- 【Android 逆向】【攻防世界】easy-dex
这一题不easy,不知为何叫这个名字.... 1. apk 安装到手机,不知所云,各种亮瞎眼闪光 2. jadx 打开apk,一行java代码都没有,打开AndroidManifest看看 <? ...
- timeit测试函数执行时间
def list_append(): l = [] for i in range(5000): l.append(i) def list_insert(): l = [] for i in range ...
- html基础和js基础
HTML基础 html文件结构 <!DOCTYPE html> 文档类型声明 <html lang="en"></html> 是html标签,称 ...