1011 World Cup Betting (20)(20 分)

#include<stdio.h>
#include<stdbool.h>
#include<stdlib.h>
#include<string.h>
int main(int argc,char const *argv[]){
    char s[]={‘W‘,‘T‘,‘L‘};
    double ans=1.0,tmp,a;
    int i,j,idx;
    for(i=0;i<3;i++ ){
        tmp=0.0;
        for(j=0;j<3;j++){
            scanf("%lf",&a);
            if(a>tmp){
                tmp=a;
                idx=j;
            }
        }
           ans*=tmp;
           printf("%c ",s[idx]);
    }
          printf("%.2f",(ans*0.65-1)*2);
      return 0;
}

原文地址:https://www.cnblogs.com/sunnybowen/p/9402489.html

时间: 2024-10-28 10:59:07

1011 World Cup Betting (20)(20 分)的相关文章

1011 World Cup Betting (20 分)

1011 World Cup Betting (20 分) With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Similarly, football be

1011. World Cup Betting (20)

1011. World Cup Betting (20) With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Similarly, football bet

1011. World Cup Betting (20)——PAT (Advanced Level) Practise

题目信息: 1011. World Cup Betting (20) 时间限制 400 ms 内存限制 32000 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing

Programming Ability Test学习 1011. World Cup Betting (20)

1011. World Cup Betting (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battl

PATA 1011 World Cup Betting (20)

1011. World Cup Betting (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battl

PAT (Advanced Level) Practice 1011 World Cup Betting (20 分)

With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Similarly, football betting fans were putting their

1011. World Cup Betting (20)(最大值)

With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Similarly, football betting fans were putting their

PAT (Advanced Level) 1011. World Cup Betting (20)

简单题. #include<iostream> #include<cstring> #include<cmath> #include<algorithm> #include<cstdio> using namespace std; double a[5][5],Max[5]; double ans=1; int main() { for(int i=1;i<=3;i++) for(int j=1;j<=3;j++) scanf(&qu

PAT甲题题解-1011. World Cup Betting (20)-误导人的水题。。。

题目不严谨啊啊啊啊式子算出来结果是37.975样例输出的是37.98我以为是四舍五入的啊啊啊,所以最后输出的是sum+0.005结果告诉我全部错误啊结果直接保留两位小数就可以了啊啊啊啊 水题也不要这么坑人啊啊啊啊 #include <iostream> #include <algorithm> #include <cstdio> #include <cstring> using namespace std; int main() { double a[3];