1011 World Cup Betting (20分)

 

 水题,简单计算。

 1 #include<iostream>
 2 #include<string> 
 3 using namespace std;
 4 int main(){  
 5     double info[3][3];
 6     double a0,a1,a2;
 7     double max;
 8     double res=1;
 9     int N[3]={0};
10     for(int i=0;i<3;i++)
11     {
12         scanf("%lf%lf%lf",&a0,&a1,&a2);
13         info[i][0]=a0;
14         info[i][1]=a1;
15         info[i][2]=a2;
16         max=info[i][0];
17         if(max<info[i][1])
18             {N[i]=1;
19              max=info[i][1];
20             }
21         if(max<info[i][2])
22             {N[i]=2;
23              max=info[i][2];
24             }
25         res=res*max;
26     }
27     res=(res*0.65-1)*2;
28     for(int i=0;i<3;i++)
29     {
30         if(N[i]==0)
31             printf("%c ",'W');
32         else if(N[i]==1)
33             printf("%c ",'T');
34         else
35             printf("%c ",'L');    
36     }
37     printf("%.2f",res);
38 return 0;
39 }

 

posted @ 2020-03-11 12:09  wsshub  阅读(113)  评论(0)    收藏  举报