Submission
Status:
PP---PP---PP-PPPP-PP
Subtask/Task Score:
60/100
Score: 60
User: letdown
Problemset: Slowly Express
Language: cpp
Time: 0.003 second
Submitted On: 2025-10-10 09:14:36
#include <iostream>
using namespace std;
int main() {
int n, l=0;
while (1) {
cin >> n;
if (n < 0) return 0;
n+=l;
if (n >= 500) {
int left = n % 800;
cout << int(n / 800) + int(left>=500) << endl;
l = 0;
if (left < 500) {
l += left;
}
} else {
l += n;
cout << 0 << endl;
};
}
}