#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int main()
{
int t1,i,t2,t3,final_at,ct1,ct2,ct3,a[3],test,total;
scanf("%d",&test);
for(i=1;i<=test;i++){
total=0;
scanf("%d %d %d %d %d %d %d",&t1,&t2,&t3,&final_at,&ct1,&ct2,&ct3);
a[0]=ct1;a[1]=ct2;a[2]=ct3;
sort(a,a+3);
total=t1+t2+t3+final_at+(a[1]+a[2])/2;
if(total>=90)
printf("Case %d: A\n",i);
else if(total>=80&&total<90)
printf("Case %d: B\n",i);
else if(total>=70&&total<80)
printf("Case %d: C\n",i);
else if(total>=60&&total<70)
printf("Case %d: D\n",i);
else if(total<60)
printf("Case %d: F\n",i);
}
return 0;
}
#include <cstdio>
#include <algorithm>
using namespace std;
int main()
{
int t1,i,t2,t3,final_at,ct1,ct2,ct3,a[3],test,total;
scanf("%d",&test);
for(i=1;i<=test;i++){
total=0;
scanf("%d %d %d %d %d %d %d",&t1,&t2,&t3,&final_at,&ct1,&ct2,&ct3);
a[0]=ct1;a[1]=ct2;a[2]=ct3;
sort(a,a+3);
total=t1+t2+t3+final_at+(a[1]+a[2])/2;
if(total>=90)
printf("Case %d: A\n",i);
else if(total>=80&&total<90)
printf("Case %d: B\n",i);
else if(total>=70&&total<80)
printf("Case %d: C\n",i);
else if(total>=60&&total<70)
printf("Case %d: D\n",i);
else if(total<60)
printf("Case %d: F\n",i);
}
return 0;
}
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন