Submission
Status:
PPP---P----P---PP--P
Subtask/Task Score:
40/100
Score: 40
User: chayuth20
Problemset: Slowly Express
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-05 13:23:21
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <cmath>
#include <iomanip>
using namespace std;
int main(){
int num;
vector<int> arr;
int man = 0;
while(cin >> num){
if(num <= 0) break;
man += num;
int point = 0;
while(man > 800){
man -= 800;
point += 1;
}
if(man <= 800 and man >= 500){
man =0;
point += 1;
}
while(man >= 500){
man -= 500;
point += 1;
}
cout << point << endl;
}
return 0;
}