Submission
Status:
--------------------
Subtask/Task Score:
0/100
Score: 0
User: pressoboi
Problemset: Slowly Express
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-01 16:17:32
#include<bits/stdc++.h>
using namespace std;
signed main(){
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int remain = 0;
while (1) {
int n;
cin >> n;
if (n < 0) break;
remain += n;
int ans;
cout << "re: " << remain << '\n';
if(remain < 500){
ans = 0;
}else{
ans = remain/800;
remain %= 800;
if(remain>=500){
ans++;
remain = 0;
}
}
cout << ans << endl;
}
return 0;
}