Submission
Status:
PPPPPPPPPPPPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: dddrrrr
Problemset: Slowly Express
Language: cpp
Time: 0.003 second
Submitted On: 2025-10-14 17:44:53
#include <bits/stdc++.h>
using namespace std;
int main(){
cin.tie(0)->sync_with_stdio(0);
int prev= 0;
while(true){
int x; cin >> x;
if(x < 0)return 0;
x+=prev;
int cnt=x/800;
x %= 800;
if(x < 500)prev = x;
else{
cnt++;
prev= 0;
}
cout << cnt << "\n";
}
return 0;
}