PAT甲题题解-1011. World Cup Betting (20)-误导人的水题。。。
题目不严谨啊啊啊啊
式子算出来结果是37.975
样例输出的是37.98
我以为是四舍五入的啊啊啊,所以最后输出的是sum+0.005
结果告诉我全部错误啊
结果直接保留两位小数就可以了啊啊啊啊
水题也不要这么坑人啊啊啊啊
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring> using namespace std;
int main()
{
double a[];
double sum=1.0;
for(int i=;i<;i++){
scanf("%lf %lf %lf",&a[],&a[],&a[]);
//printf("%lf %lf %lf\n",a[0],a[1],a[2]);
if(a[]>=a[] && a[]>=a[]){
printf("W ");
sum*=a[];
}
else if(a[]>=a[] && a[]>=a[]){
printf("T ");
sum*=a[];
}
else{
printf("L ");
sum*=a[];
}
}
sum=(sum*0.65-)*;
printf("%.2lf\n",sum);
return ;
}
PAT甲题题解-1011. World Cup Betting (20)-误导人的水题。。。的更多相关文章
- 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 (Advanced Level) Practice 1011 World Cup Betting (20 分) (找最值)
With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excite ...
- 【PAT Advanced Level】1011. World Cup Betting (20)
简单模拟题,遍历一遍即可.考察输入输出. #include <iostream> #include <string> #include <stdio.h> #inc ...
- 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 ...
- 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 ...
- PATA 1011 World Cup Betting (20)
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 ...
随机推荐
- SAP业务蓝图设计的一些想法
SAP蓝图设计是面向业务流程的,目前国内很多软件公司在做蓝图设计(概要设计)都是面向功能的,而对于用户来说,需要的不是一个个功能点,而是要实现具体的业务.功能点是一个点,而业务流程是一条线.是在梳理业 ...
- 团队作业——Beta冲刺1
团队作业--Beta冲刺 冲刺任务安排 杨光海天 今日任务:开会讨论下,Beta阶段主要的冲刺内容 明日任务:根据冲刺内容,具体分配个人任务,对于冲刺内容做准备 吴松青 今日任务:跟新组员熟悉下,联络 ...
- Flex 布局知识点梳理
传统的布局方案,在针对特殊布局时会很不方便,比如垂直居中,把一个容器等分为N列等等.自从 Flex 出现以后,这些都迎刃而解了,本文对Flex相关内容做一个简单梳理. 什么是 Flex Flex 是 ...
- vue2.0模拟锚点
在vue项目中,因为采用路由跳转,会导致无法使用常规的a标签配合ID的锚点功能. 解决办法: <a href="javascript:void(0)" @click=&quo ...
- Nginx实践--安全升级
之前写了一些nginx的东西,这次继续,主要使用upstream针对proxy_pass转发做个处理 一般情况下我们在使用nginx反向代理的时候,都是如下配置, ... location /api ...
- NOIP模拟赛-2018.11.5
NOIP模拟赛 好像最近每天都会有模拟赛了.今天从高二逃考试跑到高一机房,然而高一也要考试,这回好像没有拒绝的理由了. 今天的模拟赛好像很有技术含量的感觉. T1:xgy断句. 好诡异的题目,首先给出 ...
- Unicode,ISO-8859-1,GBK,UTF-8编码及相互转换(转载)
第二篇:JAVA字符编码系列二:Unicode,ISO-8859-1,GBK,UTF-8编码及相互转换 1.函数介绍在Java中,字符串用统一的Unicode编码,每个字符占用两个字节,与编码有关的两 ...
- python requests 简单实现易班登录,自动点赞,评论,发表
小编能力有限,本文纯属瞎编,如有雷同,你去打辅导员涩 一.前戏 有个操蛋,操蛋,操蛋的辅导员促使小编成长,原因:易班需要活跃度,辅导员安排班上每个人必须去易班上 写文章,写评论,发投票... 我觉得 ...
- <数据结构与算法分析>读书笔记--利用Java5泛型实现泛型构件
一.简单的泛型类和接口 当指定一个泛型类时,类的声明则包括一个或多个类型参数,这些参数被放入在类名后面的一对尖括号内. 示例一: package cn.generic.example; public ...
- Android 在测试阶段当出现多个测试服务器地址时打包的小技巧
前提:服务端没有做特殊处理 在开发android网络客户端项目时,不可避免的会用到“测试服务器地址”和“云端服务器地址”等.(有时可能会有多个) 这时在打包给测试那帮哥们时,你就需要一个服务器地址打上 ...