#1011. World Cup Betting (20)
套公式算就好
#include <bits/stdc++.h>
using namespace std;
int main()
{
double s = 1;
for (int i = 0; i < 3; i++) {
double t = 0;
int maxj = 0;
for (int j = 0; j < 3; j++) {
double x;
scanf("%lf", &x);
if (x > t) {
t = x;
maxj = j;
}
}
if (maxj == 0) {
printf("W ");
} else if (maxj == 1) {
printf("T ");
} else if (maxj == 2) {
printf("L ");
}
s *= t;
}
double ans = (s * 0.65 - 1) * 2;
printf("%.2f\n", ans);
}
博客提及世界杯投注问题,指出通过套公式计算即可解决。
1006

被折叠的 条评论
为什么被折叠?



