Submission
Status:
PPPPPPPPPPPPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: kawinavokiwi
Problemset: Slowly Express
Language: cpp
Time: 0.002 second
Submitted On: 2026-10-09 21:23:42
#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 && n>=500){
x = 1;
n = 0;
}else{
x = n/800;
}
if(n%800 >= 500){
x += 1;
y = 0;
}else{
y = n%800;
}
cout << x << '\n';
}else{
break;
}
}
}