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 ...
随机推荐
- 阶段3 1.Mybatis_05.使用Mybatis完成CRUD_1 回顾Mybatis的环境搭建-实现查询所有功能
先回顾Mybits的环境搭建,. 直接next 直接点击finish 创建好的项目. 所有东西都自己写不现实,约束文件的头部还是拷贝过来 导入依赖坐标,Mybits mysql的驱动 log4j 单元 ...
- DELPHI中函数、过程变量的声明与应用
Procedure型变量: 在DELPHI中,函数.过程的地址可以赋给一个特殊类型的变量,变量可用如下方式声明: var p : procedure(num:integer); //过程 或: var ...
- vue-router实现组件间的跳转---参数传递
四.通过VueRouter来实现组件之间的跳转:参数的传递 login ---用户名--->main ①明确发送方和接收方②配置接收方的路由地址 {path:'/myTest',componen ...
- 可持久化并查集 by zky
zz:https://www.cnblogs.com/cjoierljl/p/9567859.html https://www.cnblogs.com/peng-ym/p/9357220.html n ...
- java中的命名规则
转载自:http://growstep.diandian.com/post/2011-08-17/3989094 1.类名首字母应该大写.属性(成员变量).方法.对象变量以及所有标识符(如形式参数.实 ...
- [DS+Algo] 001 先简单说说算法
目录 1. 通俗地讲 2. 算法的五大特性 3. 众所周知的"公式" 4. 举个例子 例 1. 百钱买百鸡 1. 数学解法 2. C 的解法 3. Python 的解法 4. Ja ...
- Dos - 学习总结(1)
1.控制台复制 1>鼠标右键,标记. 2>选定复制内容后,鼠标右键,完成复制. 2.
- 微信JSSdk实现分享功能
1. 概述 微信分享服务器的作用是为用户在微信浏览器端对来自网站以及客户端的页面进行二次分享链接时更友好的展示提供服务.为实现二次分享功能需要使用微信JS-SDK来开发. 微信JS-SDK是微信公众平 ...
- IDEA使用指北教程
来自官网的指导手册: https://www.jetbrains.com/help/idea/2019.1/run-for-the-first-time.html?section=Windows 记得 ...
- [pwnable.kr] - wtf
Q: I don't understand why my exploit is not working. I need your help. download : http://pwnable.kr/ ...