Submission
Status:
--------------------
Subtask/Task Score:
0/100
Score: 0
User: pann
Problemset: Slowly Express
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-09 01:44:12
#include <iostream>
using namespace std;
int main(){
int total = 0, n;
while (true){
cin >> n;
if (n < 0) break;
total += n;
int count = 0;
while (total != 0){
if (total >= 800){
total -= 800;
count++;
}
else if (total >= 500){
total = 0;
count++;
}
else break;
}
cout << count;
}
return 0;
}