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 ...
随机推荐
- 我在DBGridEh增加一栏复选框及对应操作的解决方案
最近客户有个需求,要求对单据列表里指定的单据进行批量审核,很自然的,我想到了在DBGridEh增加一栏复选框的列,审核时遍历所有单据,将打了勾的单据审核就可以了.查阅了网上很多文章,不外有2个方案,1 ...
- wpf slider刻度
TickFrequency:刻度之间的间隔 IsSnapToTickEnabled:是否对齐到刻度 TickPlacement:刻度位置
- ubuntu 16.04 配置ssl
Let's Encrypt 的服务相信很多人都知道了,我个人认为这是最好的免费 SSL 服务.下面内容即使如何在自己的网站上使用 Let's Encrypt 实现 SSL. 前提条件 自己拥有一个域名 ...
- 测试需要了解的技术之基础篇三__持续集成持续交付DevOps
持续集成.持续交付.DevOps 1.容器技术Docker:容器技术介绍.Docker安装与加速配置.Docker基础命令.Docker搭建selenium.Docker搭建持续集成平台Jenkins ...
- 63 (OC)* NSAutoreleasePool 自动释放池
目录 0:ARC 1: 自动释放池 2:NSAutoreleasePool实现原理 3:autorelease 方法 4: Runloop和Autorelease的关系 5: Using Autore ...
- kafka消费者脚本无法启动问题
console-consumer can't rebalance after 4 retries 解决方案:kafka0.9版本换成1.0版本 究竟是怎么回事我也不知道
- 005 gcc 的简单使用
0. 前言 本文主要讲关于 gcc 的几种编译方式 不妨设文件名为 test.c 1. 方法一 $ gcc test.c (Windows OS)编译成功的话,没有回馈,在 test.c 所在的文件夹 ...
- zookeeper设置客户端连接超时被expired
在网络环境非常差的情况下,使用zookeeper集群往往会遇到连接expired了: 客户端提示连接从ZOO_CONNECTION_STATE变为ZOO_EXPIRED_SEESION_STATE,然 ...
- P3951小凯的疑惑
这是2017年提高组的第一题,是一个小学奥数题?听说很多大佬爆零了,我AC了,,, 这个题首先给出两个素数,问取任意个这两个素数之和不可以达到的最大的数是多少?拿到这个题首先很蒙,于是试了试样例,并没 ...
- Ubuntu终端路径和文件夹相互切换
一. 环境配置 1. 打开终端输入安装命令 sudo apt-get install nautilus-open-terminal 2. 重新加载文件管理器 nautilus -q 3. 重启电脑 s ...