1 solutions
-
1
#include <bits/stdc++.h> using namespace std; long long a, b, c, x, k; int main() { cin >> a >> b >> c; x = c / (5 * a + 2 * b), c -= x * (5 * a + 2 * b); for (int i = 1;i <= 7;i++) { k++; if (i <= 5) { c -= a; } else { c -= b; } if (c <= 0) { break; } } cout << x * 7 + k; return 0; }
Information
- ID
- 1061
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 7
- Tags
- # Submissions
- 39
- Accepted
- 9
- Uploaded By