Submission

Status:

PPP---P-PP----------

Subtask/Task Score:

30/100

Score: 30

User: Tjeez

Problemset: Slowly Express

Language: cpp

Time: 0.002 second

Submitted On: 2026-10-10 00:11:21

#include <bits/stdc++.h>
using namespace std;
int main(){
	vector<int> v;
	int sm=0;
	while (true){
		int n; cin>>n;
		if (n<0) return 0;
		sm+=n;
		if (sm>=500){
			int car=0;
			while (sm>=500){
				sm-=800;
				car++;
			}
			cout<<car<<"\n";
		}
		else {
			cout<<0<<"\n";
		}
	}
}