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 ...
随机推荐
- lgb模板
一 回归 1 提取训练集和测试集 2 制作标签,并检查标签是否有异常值 2 划分数据 https://www.jb51.net/article/152574.htm 3 建立model,写评价函数 h ...
- robotframework之使用cookies登陆
有的系统是使用cookies保持登陆的,而RF的Request库里面没有像Selenium2Library里面一样操作cookies的关键字,若接口需要登录则只能用UI自动化先登录,然后再将cooki ...
- 【工具安装】BurpSuite 安装教程
日期:2019-07-14 17:23:53 介绍:安装 JDK,配置 JDK 的环境变量.安装 BurpSuite,抓包 0x01. 安装 JDK 安装 JDK BurpSuite 需要 JAVA ...
- Centos 安装 FTP
安装教程: 基于 CentOS 搭建 FTP 文件服务 搭建完成后,使用windows文件夹访问FTP报错,请确保输入的文件名是否正确,并且您有权访问此文件. 先确认ftp服务正常 修改: 设 ...
- SELECT-OPTIONS对象
1. SELECT-OPTIONS基本语法及定义 SELECT-OPTIONS通常用于参照一数据库字为建立数据输入域,其定义对象命名长度不能超过8位,其产生的屏幕对象最大输入长度为18位,语法如下: ...
- lua 十进制转二进制
-- Converts a byte to a string of 0s and 1s. function byte2bin(n) local t = {} for i=7,0,-1 do t[#t+ ...
- linux 进程间共享内存示例
写入端: #include <iostream> #include <unistd.h> #include <stdlib.h> #include <stdi ...
- 【Linux开发】如何查看Linux kernel的内置模块驱动列表和进程ID
[Linux开发]如何查看Linux kernel的内置模块驱动列表和进程ID 标签:[Linux开发] 命令: cat /lib/modules/$(uname -r)/modules.builti ...
- 100+ Python挑战性编程练习(2)
熟能生巧,多撸代码多读书 https://github.com/zhiwehu/Python-programming-exercises/blob/master/100+%20Python%20cha ...
- [BZOJ3133] [Baltic2013]ballmachine(树上倍增+堆)
[BZOJ3133] [Baltic2013]ballmachine(树上倍增+堆) 题面 有一个装球机器,构造可以看作是一棵树.有下面两种操作: 从根放入一个球,只要下方有空位,球会沿着树滚下.如果 ...