Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int osel(int x) {
- return 5;
- }
- int At(int x) {
- int res = 0;
- while (x > 0) {
- x -= 20;
- res++;
- if (x <= 0)
- break;
- res++;
- }
- return res;
- }
- int main(){
- int q, ans = 0;
- cin >> q;
- while (q >= 200) {
- ans += 5;
- q -= 200;
- if (q == 0) {
- break;
- }
- ans += 3;
- }
- cout << ans + min(osel(q), At(q));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement