【PAT】甲级1011 - World Cup Betting(水)
2017-07-20 15:42
501 查看
题目链接:点击打开题目
这道题本来是没什么可贴博客的,就是读题那个65%那一点不知道什么意思,但是按照给的例子跑了一遍,并没有什么问题,还是水题。
代码如下:
这道题本来是没什么可贴博客的,就是读题那个65%那一点不知道什么意思,但是按照给的例子跑了一遍,并没有什么问题,还是水题。
代码如下:
#include<queue> #include<cmath> #include<stack> #include<cstdio> #include<vector> #include<cstring> #include<iostream> #include<algorithm> using namespace std; typedef long long LL; #define INF 0x3f3f3f3f #define CLR(a,b) memset(a,b,sizeof(a)) #define PI acos(-1.0) double W,T,L; double choose() { if (W > T && W > L) { cout << "W "; return W; } else if (T > W && T > L) { cout << "T "; return T; } else { cout << "L "; return L; } } int main() { double ans = 1.0; for (int i = 1 ; i <= 3 ; i++) { cin >> W >> T >> L; ans *= choose(); } ans = (ans*0.65-1)*2.0; printf ("%.2lf\n",ans); return 0; }
相关文章推荐
- PAT(甲级) 1011. World Cup Betting (20)
- PAT 甲级 1011. World Cup Betting (20)
- PAT 甲级 1011. World Cup Betting (20)
- PAT 甲级 1011. World Cup Betting (20)
- PAT甲级1011. World Cup Betting
- 1011. World Cup Betting (20) PAT 甲级
- pat甲级1011. World Cup Betting (20)
- pat甲级1011. World Cup Betting (20)
- 【PAT甲级】1011. World Cup Betting (20)
- 1011. World Cup Betting (20)-PAT甲级真题
- PAT(甲级)1011. World Cup Betting (20)
- [PAT-甲级]1011.World Cup Betting
- PAT 甲级 1011. World Cup Betting
- PAT甲级 1011. World Cup Betting (20)
- PAT甲级.1011. World Cup Betting (20)
- PAT甲级 1011.World Cup Betting(20) 题目翻译与答案
- PAT甲级1011. World Cup Betting (20)
- PAT甲级真题及训练集(7)--1011. World Cup Betting (20)
- [PAT甲级]1011. World Cup Betting (20)(世界杯投注)
- PAT 甲级 1011. World Cup Betting