当前位置:网站首页>PAT1011

PAT1011

2022-08-09 11:09:00 AlanLiu6

https://pintia.cn/problem-sets/994805342720868352/problems/994805504927186944

#include<cstdio>



int main()
{
    //double num[3];
   // int num[3];
    double sum = 1;
    for(int i = 0;i < 3;i++)
    {
        double maxn = 0;
        int choose = -1;
        for(int j = 0;j < 3;j++)
        {
            double t;
            scanf("%lf",&t);
            if(t > maxn)
            {
                choose = j;
                maxn = t;
            }
        }
        sum *= maxn;
        if(choose == 0) printf("W ");
        else if(choose == 1) printf("T ");
        else printf("L ");
    }
    sum = sum*0.65 -1 ;
 //   sum = 1;
    sum *= 2;

    printf("%.2lf\n",sum);

    return 0;
}

原网站

版权声明
本文为[AlanLiu6]所创,转载请带上原文链接,感谢
https://blog.csdn.net/Alen666/article/details/98118323