#include<bits/stdc++.h>
using namespace std;
int mile(int dur)
{
int sum=0;
while(dur>=0){
sum+=10;
dur-=30;
}
return sum;
}
int juice(int dur)
{
int sum=0;
while(dur>=0){
sum+=15;
dur-=60;
}
return sum;
}
int main()
{
ios_base::sync_with_stdio(0);
int T,kase=0;
cin>>T;
while(T--){
int t,dur,m=0,j=0;
cin>>t;
while(t--){
cin>>dur;
m+=mile(dur);
j+=juice(dur);
}
if(m>j)cout<<"Case "<<++kase<<": Juice "<<j<<'\n';
else if(j>m)cout<<"Case "<<++kase<<": Mile "<<m<<'\n';
else cout<<"Case "<<++kase<<": Mile Juice "<<m<<'\n';
}
return 0;
}
using namespace std;
int mile(int dur)
{
int sum=0;
while(dur>=0){
sum+=10;
dur-=30;
}
return sum;
}
int juice(int dur)
{
int sum=0;
while(dur>=0){
sum+=15;
dur-=60;
}
return sum;
}
int main()
{
ios_base::sync_with_stdio(0);
int T,kase=0;
cin>>T;
while(T--){
int t,dur,m=0,j=0;
cin>>t;
while(t--){
cin>>dur;
m+=mile(dur);
j+=juice(dur);
}
if(m>j)cout<<"Case "<<++kase<<": Juice "<<j<<'\n';
else if(j>m)cout<<"Case "<<++kase<<": Mile "<<m<<'\n';
else cout<<"Case "<<++kase<<": Mile Juice "<<m<<'\n';
}
return 0;
}
No comments:
Post a Comment