Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main() {
- int t, c=1;
- scanf("%d", &t);
- while(t--) {
- int n, in, sum=0, m=0, j=0, t1, t2;
- scanf("%d", &n);
- while(n--) {
- scanf("%d", &sum);
- t1=sum/30;
- t1++;
- m+=t1*10;
- t2=sum/60;
- t2++;
- j+=(t2*15);;
- }
- printf("Case %d: ", c++);
- if(m<j)
- printf("Mile %d\n", m);
- else if(m==j)
- printf("Mile Juice %d\n", m);
- else
- printf("Juice %d\n", j);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement