题目不严谨啊啊啊啊
式子算出来结果是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)-误导人的水题。。。的更多相关文章

  1. 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 ...

  2. 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 ...

  3. 【PAT Advanced Level】1011. World Cup Betting (20)

    简单模拟题,遍历一遍即可.考察输入输出. #include <iostream> #include <string> #include <stdio.h> #inc ...

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. PAT 甲级 1011 World Cup Betting (20)(代码+思路)

    1011 World Cup Betting (20)(20 分) With the 2010 FIFA World Cup running, football fans the world over ...

  8. PATA 1011 World Cup Betting (20)

    1011. World Cup Betting (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Wit ...

  9. PAT Advanced 1011 World Cup Betting (20 分)

    With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excite ...

随机推荐

  1. 开源作业调度框架 - Quartz.NET - Cron表达式测试

    昨天简单写了一下如何使用Quzrtz.NET. 那么问题来了,我设置了Cron表达式之后如何知道是表达式是否按照预期的时间执行了呢? 我找到了些Cron表达式工具生成了表达式,确发现它们基本上没有进行 ...

  2. 自带hyper -v 或者 Vmware安装Linux centos

    centos系统存在网盘,链接: https://pan.baidu.com/s/1A5ywyLjIegcftaT_xCvPbA 密码: n6v4 https://blog.csdn.net/nanc ...

  3. Python3中遇到UnicodeEncodeError: 'ascii' codec can't encode characters in ordinal not in range(128)

    在 linux服务器上运行代码报错: Python3中遇到UnicodeEncodeError: ‘ascii’ codec can’t encode characters in ordinal no ...

  4. FastJson遇见的问题或项目实战中优化的问题,看源码都可以解决

    1:感觉见鬼了一般存储JSONObject中的字段竟然不见了? JSONObject object=new JSONObject(); Map fields = new HashMap(); fiel ...

  5. PSR规范0-4整理

    PSR规范 psr规范 引言: PSR 是 PHP Standard Recommendations 的简写,由 PHP FIG 组织制定的 PHP 规范,是 PHP 开发的实践标准.这些规范的目的是 ...

  6. Mysql从库复制的2个问题

    .为什么执行stop slave; 再start slave;可以继续主从关系呢? 其实执行stop slave;就是分别关闭了I/O线程(stop slave IO_THREAD;)和SQL线程(s ...

  7. 树莓派学习笔记(5):成功实现NAS家庭服务器(流媒体播放、文件共享及下载机)

    转载请注明:@小五义http://www.cnblogs.com/xiaowuyiQQ群:64770604 一.家庭服务器实现的主要功能 1.流媒体播放服务:利用DLNA实现电视.手机.电脑播放其上面 ...

  8. C# 匿名类型var

    格式: var 名字=new {字段赋值}:c#中只是作为推断,根据赋值推断出类型,隐式类型 var. 隐式类型的本地变量是强类型变量(就好像您已经声明该类型一样),但由编译器确定类型. 1)var类 ...

  9. 在main函数前后执行的函数之 C语言

    在gcc中,可以使用attribute关键字,声明constructor和destructor,来指定了函数在main之前或之后运行,代码如下: #include <stdio.h> __ ...

  10. activiti发布APP时报错:关联的流程无效

    解决办法: 1.检查流程命名和任务命名以及其他命名中是否有特殊字符,有一些字符是不支持的.(中文是可以的,中文标点符号可能不行,我的经验是顿号会报错) 2.检查流程图,把鼠标放到每一根连接线上,观察它 ...