美文网首页
1011 World Cup Betting (20 分)

1011 World Cup Betting (20 分)

作者: 79d12e22ec53 | 来源:发表于2019-07-31 10:27 被阅读0次
#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);
}

相关文章

网友评论

      本文标题:1011 World Cup Betting (20 分)

      本文链接:https://www.haomeiwen.com/subject/wfczrctx.html