Submission
Status:
PPPP-P-PP-PP---PP---
Subtask/Task Score:
55/100
Score: 55
User: Sense.exe
Problemset: Slowly Express
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-08 17:33:03
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int num=0,cur=0,car,total;
while(num>=0) {
cin >> num;
if(num<0) {
return 0;
}
car = 0;
if(num+cur>=500) {
total = num+cur;
car+=total/800;
cur = total%800;
if(cur>=500) {
car++;
cur = 0;
}
}
cout << car << "\n";
}
}