题目描述
英文
中文大意
输入三场比赛,每场比赛三个赔率 分别对应 W T L
找出每场比赛的最大赔率点,并输出它,并在最后通过给定的公式计算一下
(ans * 0.65 - 1) * 2
样例
思路分析
本题是水题,没什么难度,最主要就是看懂英文
code
#include <iostream>
#include <stdio.h>
using namespace std;
char s[3] = {'W', 'T', 'L'};
char c[3];
int main() {
double max = 0, ans = 1;
double a[3];
for (int i = 0;i < 3;i++) {
// 每次记得重置
max = 0;
for (int j = 0;j < 3;j++) {
cin >> a[j];
if (a[j] > max) {
max = a[j];
c[i] = s[j];
}
}
ans *= max;
}
for (int i = 0;i < 3;i++) cout << c[i] << " ";
printf("%.2f", (ans * 0.65 - 1) * 2);
}