Submission
Status:
---------------P----
Subtask/Task Score:
5/100
Score: 5
User: kawinavokiwi
Problemset: Slowly Express
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-09 21:22:13
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
int x = 0;
int y = 0;
while(cin >> n){
if(n>=0){
n = n+y;
if(n>=800){
x = n/800;
y = n&800;
}
if(n%800 >= 500){
x += 1;
y = 0;
}
else{
y = n%800;
}
cout << x << '\n';
}else{
break;
}
}
}