入门模拟——A1011 World Cup Betting

#include <bits/stdc++.h>
#include<math.h>
using namespace std;
const int MAX_LEN = 100005;
int main(){
    char temp[MAX_LEN];
    float res[MAX_LEN];
    float f1,f2,f3;
    for(int i=0;i<3;++i){
        cin>>f1;
        cin>>f2;
        cin>>f3;
        float j = max(max(f2,f3),f1);
        if(j == f1){
            temp[i] = 'W';
        }
        if(j == f2){
            temp[i] = 'T';
        }
        if(j == f3){
            temp[i] = 'L';
        }
        res[i] = j;
    }
    f1 = res[0];
    f2 = res[1];
    f3 = res[2];
    float result = ((f1 * f2 * f3 * 0.65)-1) * 2;
    for(int i=0;i<3;++i){
        cout<<temp[i]<<" ";
    }
    printf("%.2f",result);
    system("pause");
    return 0;
} 
原文地址:https://www.cnblogs.com/JasonPeng1/p/12115403.html