Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define ll long long
- #define endl '\n'
- #define sz(x) int(x.size())
- #define all(x) x.begin(), x.end()
- int main() {
- ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
- int testcases;
- cin >> testcases;
- for (int test = 1; test <= testcases; test++) {
- int n, x;
- cin >> n;
- int a = 0, b = 0;
- for (int i = 0; i < n; i++) {
- cin >> x;
- a += 10 * (x / 30 + 1);
- b += 15 * (x / 60 + 1);
- }
- cout << "Case " << test << ": ";
- if (min(a, b) == a) cout << "Mile ";
- if (min(a, b) == b) cout << "Juice ";
- cout << min(a, b) << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement