Submission
Status:
PPPPPPPPPPPPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: tl.cpp
Problemset: Slowly Express
Language: cpp
Time: 0.004 second
Submitted On: 2026-08-05 14:15:31
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int n;
int sum;
int main() {
ios::sync_with_stdio(0), cin.tie(0);
while (1) {
cin >> n;
int car = 0;
if (n < 0) return 0;
sum += n;
while (sum >= 500) {
if (sum < 800) {
sum = 0;
car++;
continue;
}
sum -= 800;
car++;
}
cout << car << '\n';
}
}