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 ...
随机推荐
- centos6.5+jdk1.7+mysql5.6+tomcat8.0部署jpress
前言:此篇记录在linux下搭建环境部署jpress,mysql使用的是源码安装 1.准备 2.安装 3.部署 1.准备 a.准备centos6.5服务器环境 mysql-5.6.19.tar.gz ...
- adb 连接 mumu 模拟器
[win版]adb connect 127.0.0.1:7555adb shell [mac版] adb kill-server && adb server && ad ...
- Field baseMapper in com.baomidou.mybatisplus.extension.service.impl.ServiceImpl required a single bean, but xx were found:
在学习使用 mybatis-plus 时,遇到一个奇怪的异常 如 代码一: 代码一: Error starting ApplicationContext. To display the conditi ...
- 数据库与前端与Django目录
数据库 [怀心抱素]初步认识数据库 [怀心抱素]mysql的表操作 [怀心抱素]mysql记录操作 [怀心抱素]mysql索引与补充 [怀心抱素]python操作mysql 前端 [怀心抱素]HTML ...
- pathlib模块替代os.path
pathlib模块替代os.path 在Python 3.4之前和路径相关操作函数都放在os模块里面,尤其是os.path这个子模块,可以说os.path模块非常常用.而在Python 3.4,标准库 ...
- Delphi XE2_XE3 Update
Delphi 和 C++Builder XE2 更新摘要 XE2的关键特性如下: 1. FireMonkey Application Platform支持运行在Windows (32和64位),Mac ...
- Git 使用疑问
1) fatal: remote origin already exists. 解决办法 ..$ git remote add origin git@git.*.com:tang/comment_s ...
- C# 同比缩放图片
/** * 无损缩放图片 * bitmap 需要缩放的图片 * w 需要缩放的宽度 * h 需要缩放的高度 * */ public static System.Drawing.Bitmap TBSca ...
- XMPP实现原理
XMPP协议简介 XMPP(Extensible Messageing and Presence Protocol:可扩展消息与存在协议)是目前主流的四种IM(IM:instant messagi ...
- centos 7 安装 nginx 或 apache,及其比较
来自 知乎 陈湛翀 的回答:https://www.zhihu.com/question/19571087/answer/12313829 nginx 和 apache 比较 nginx 相对 apa ...