#include <iostream>
using namespace std;
int main(){
int t, n, d, mile, juice, cs = 1;
cin >> t;
while(t--){
cin >> n;
mile = 0;
juice = 0;
while(n--){
cin >> d;
if(d%10 == 0)d++;
mile += ((d/30)+1);
juice += ((d/60)+1);
}
int mile_ans = mile * 10, juice_ans = juice * 15;
if(mile_ans < juice_ans)cout << "Case " << cs << ": Mile " << mile_ans << endl;
else if(mile_ans > juice_ans)cout << "Case " << cs << ": Juice " << juice_ans << endl;
else if(mile_ans == juice_ans)cout << "Case " << cs << ": Mile Juice " << juice_ans << endl;
cs++;
}
return 0;
}
using namespace std;
int main(){
int t, n, d, mile, juice, cs = 1;
cin >> t;
while(t--){
cin >> n;
mile = 0;
juice = 0;
while(n--){
cin >> d;
if(d%10 == 0)d++;
mile += ((d/30)+1);
juice += ((d/60)+1);
}
int mile_ans = mile * 10, juice_ans = juice * 15;
if(mile_ans < juice_ans)cout << "Case " << cs << ": Mile " << mile_ans << endl;
else if(mile_ans > juice_ans)cout << "Case " << cs << ": Juice " << juice_ans << endl;
else if(mile_ans == juice_ans)cout << "Case " << cs << ": Mile Juice " << juice_ans << endl;
cs++;
}
return 0;
}
No comments:
Post a Comment