[PAT]1011. World Cup Betting (20)
2016-08-06 00:46
513 查看
#include<iostream> using namespace std; int main() { double profit=1; char dict[3]={'W','T','L'}; char ans[3]; double input[3]; int kk=0; while(scanf("%lf%lf%lf",&input[0],&input[1],&input[2])!=EOF) { kk=kk+1; double tmp=0; int n=0; for(int m=0;m<3;m++) { if(tmp<input[m]) { tmp=input[m]; n=m; } } profit=profit*tmp; ans[(kk-1)%3]=dict ; if(kk%3==0) { profit=(profit*0.65-1)*2; for(int k=0;k<3;k++) { cout<<ans[k]<<" "; } printf("%.2lf\n",profit);//这里有个问题 profit=1; } } return 0; }
相关文章推荐
- PAT甲级1011. World Cup Betting (20)
- PAT 1011. World Cup Betting (20)
- PAT(甲级) 1011. World Cup Betting (20)
- PAT (Advanced Level) Practise 1011 World Cup Betting (20)
- [PAT甲级]1011. World Cup Betting (20)(世界杯投注)
- PAT 1011. World Cup Betting (20)
- PAT 1011::World Cup Betting (20)
- 【PAT Advanced Level】1011. World Cup Betting (20)
- PAT 甲级 1011. World Cup Betting (20)
- PAT (Advanced Level) 1011. World Cup Betting (20)
- pat甲级1011. World Cup Betting (20)
- PAT(甲级)1011. World Cup Betting (20)
- PAT-A 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 (20)-误导人的水题。。。
- PAT甲级.1011. World Cup Betting (20)
- 浙江大学PAT上机题解析之1011. World Cup Betting (20)
- PAT 1011. World Cup Betting (20)