Submission

Status:

PPPPPPPPPPPPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Neozaawwman1

Problemset: Slowly Express

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-10 09:02:42

#include <bits/stdc++.h>
using namespace std;
int main(){
	vector<int> output;
	while(true){
		int x, n;cin>>x;
		int i=0;
		if(x<0){
			break;
		}
		x=x+n;
		if(x>800){
			i+=x/800;
			x=x-((x/800)*800);
		}
		if(x<500){
			n=x;
		}else{
			n=0;
			i++;
		}
		output.push_back(i);
	}
	for(int i=0; i<output.size(); i++){
		cout<<output[i]<<endl;
	}
	
	return 0;
}