1011 World Cup Betting (20 分)

2019-07-31  本文已影响0人  79d12e22ec53
#include <iostream>
#include <stdio.h>

char s[3] = {'W', 'T', 'L'};

int main(int argc, char *argv[]) {
    double ans = 1.0, a, temp;
    int idx;
    for(int i=0; i<3; i++) {
        temp = 0.0;
        
        for(int j=0; j<3; j++) {
            scanf("%lf", &a);
            if(a > temp) {
                temp = a;
                idx = j;
            }
        }
        ans *= temp;
        printf("%c ", s[idx]);
    }
    printf("%.2lf", (ans*0.65-1)*2);
}

上一篇 下一篇

猜你喜欢

热点阅读