Lang:G++
Edit123456789101112131415161718192021222324252627282930#include <bits/stdc++.h>using namespace std;int main() {int x, y, z;int cnt;while(cin >> x >> y >> z) {if(y < z) swap(y, z);if(x < y) swap(x, y);if(x <= y + z) {cnt = (x + y + z) / 20;cnt += (x + y + z) % 20 ? 1 : 0;} else {cnt = (y + z) / 10;x -= (y + z) / 10 * 10;int r = (y + z) % 10;if(r >= 8) {x -= r;cnt++;} else {x += r;}cnt += x / 15;cnt += x % 15 == 0 ? 0 : 1;}cout << cnt * 6 << endl;}return 0;}