题目不严谨啊啊啊啊
式子算出来结果是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. 使用Python+opencv2时的文件命名及路径问题

    最近在做一个数字图像的小项目,在最后的界面与程序结合阶段总是出现单个程序可以运行,但是使用界面传递的参数就运行不了的情况.在网上查了很多相关错误,最终确定是文件命名问题. 错误如下: cv2.erro ...

  2. window与Linux之间的文件传输

    使用工具:WinSCP WinSCP可以直接通过SSH链接你的linux服务器:然后进行文件的复制操作:并且可以直接编辑文件. 1.下载WinSCP 2.登录WinSCP,输入你的Linux 的IP地 ...

  3. 四、 git关联远程仓库及推送

    接之前笔记,在 github上建立与本地同名的仓库 demo 关联远程仓库 1. https 模式     远程库的名字就是origin,这是Git默认的叫法 git remote add origi ...

  4. swift的多态

    协议多态: 函数式编程多态:高阶函数的多态性: 泛型多态:泛型的基于约束编程: 共同点:相同的接口,不同的行为:

  5. CentOS常用命令备忘

    1. 查看进程 ps -a 杀掉进程 kill PID 2. 添加计划任务crontab -e 例如:30 21 * * * service httpd restart 每天21:30重启apache ...

  6. WorldWind源码剖析系列:缓冲类Cache

    缓冲类Cache主要用于在最小的限制条件下保存从远程服务器通过网络下载下来的地理空间数据,以便当用户处于离线状态时能够使用这些已经缓冲好的数据.Google Earth也采用类似机制处理用户离线浏览漫 ...

  7. hadoop集群部署配置补充

    /etc/hosts192.168.153.147 Hadoop-host192.168.153.146 Hadoopnode1 192.168.153.145 Hadoopnode2::1 loca ...

  8. Python 函数(三)

    Python 3 函数 (闭包.装饰器.递归.高阶函数) 一.闭包 内部函数可以引用外部函数的参数和局部变量,当外部函数返回内部函数时,相关参数和变量 都保存在返回的函数中,简单的说,这种内部函数可以 ...

  9. Android导入AS工程

     AS  导入工程 还得 新建工程贴代码 

  10. Iframe和Frame中实现cookie跨域的方法(转载)

    在Iframe和Frame中默认是不支持Cookie跨域的,但通过设置P3P协议相关的响应头可以解决这一问题.关于p3p协议: P3P: Platform for Privacy Preference ...