A1011
找最大的,然后按规定计算后输出。
没啥可说的,除非犯了愚蠢的错误(比如把j写成i这种),按题目要求写就是了。
#include<cstdio>
int main(){
char A[]={'W','T','L'};
double sum=1.0,temp;
int cont=;
for(int i=;i<;i++){
double maxvalue=0.0;//最大值必须在循环开始的时候刷新
for(int j=;j<;j++){
scanf("%lf",&temp);
if(temp>=maxvalue) {
maxvalue=temp;
cont=j;
}
}
printf("%c ",A[cont]);
sum*=maxvalue;
}
printf("%.2f",(sum*0.65-)*);
return ;
}
A1011的更多相关文章
- PTA A1011&A1012
A1011 World Cup Betting (20 分) 题目内容 With the 2010 FIFA World Cup running, football fans the world ov ...
- A1011. World Cup Betting
With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excite ...
- PAT A1011 World Cup Betting(20)
AC代码 #include <cstdio> #include <algorithm> const int max_n = 3; using namespace std; /* ...
- PAT甲级——A1011 World Cup Betting
With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excite ...
- PAT/查找元素习题集
B1004. 成绩排名 (20) Description: 读入n名学生的姓名.学号.成绩,分别输出成绩最高和成绩最低学生的姓名和学号. Input: 每个测试输入包含1个测试用例,格式为: 第1行: ...
- iot表和heap表排序规则不同
SQL> select * from (select * from t1 order by id ) where rownum<20; ID A1 A2 A3 ---------- --- ...
- Oracle 排序规则
<pre name="code" class="html">SQL> select * from t1 where id>=1 and ...
- 玩玩LED点阵屏(arduino nano)
做些记录,特别是led显示左移效果的代码,二进制位的特效函数 unsigned ][]= { 0xff,0xd7,0x83,0xd6,0xc6,0xd4,0xc6,0x82,0xd6,0xba,0xf ...
- 1011 World Cup Betting (20 分)
1011 World Cup Betting (20 分) With the 2010 FIFA World Cup running, football fans the world over wer ...
随机推荐
- 《Using Databases with Python》 Week2 Basic Structured Query Language 课堂笔记
Coursera课程<Using Databases with Python> 密歇根大学 Week2 Basic Structured Query Language 15.1 Relat ...
- RESR API (二)之Responses
Responses 与基本的HttpResponse对象不同,TemplateResponse对象保留 the details of the context that was provided by ...
- tensorflow运行原理分析(源码)
tensorflow运行原理分析(源码) https://pan.baidu.com/s/1GJzQg0QgS93rfsqtIMURSA
- 项目测试完成后,总结典型性bug,以测试的角度,应该怎么筛选bug
一个wap端改版项目完结了,总结下测试过程中的典型性bug:应该从哪个角度去总结? 有点疑问?不知道是以bug的影响度去总结,还是以优先级去总结(好像优先级和影响度是成正比的,优先级比较高的bug,影 ...
- python每日一练:0015题
第 0015 题: 纯文本文件 city.txt为城市信息, 里面的内容(包括花括号)如下所示: { "1" : "上海", "2" : & ...
- Win10.Shift+鼠标右键_CMD(管理员)
1.资料: 1.1.Windows10下设置Shift+右键增加cmd - wyx0712的博客 - CSDN博客.html(https://blog.csdn.net/wyx0712/article ...
- C语言第十周作业
这个作业属于哪个课程 C语言程序设计 这个作业的要求在哪里 https://edu.cnblogs.com/campus/zswxy/computer-scienceclass3-2018/h ...
- android gradle项目剖析
1 配置文件 1.1 gradle属性文件 1.1.1 gradle.properties 对项目范围内的gradle进行配置,比如设置cache. 1.1.2 local.properties 设置 ...
- 小油2018 win7旗舰版64位GHOST版的,安装telnet客户端时,提示:出现错误。并非所有的功能被成功更改。
win7旗舰版64位GHOST版的,安装telnet客户端时,提示:出现错误.并非所有的功能被成功更改. 从安装成功的电脑上拷贝ghost版本缺少的文件,然后再安装telnet客户端,我已打包 链接: ...
- Tomcat 一台机器运行多个Tomcat
转 https://www.cnblogs.com/andy1234/p/8866588.html 在一台Win10 PC 上面同时开启两个Tomcat系统为例. 1. 硬件环境 2. 到Tomcat ...