Submission

Status:

PPPPPPPPPPPPP-PPPPPP

Subtask/Task Score:

95/100

Score: 95

User: qweqwe

Problemset: Slowly Express

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-14 19:20:42

#include <bits/stdc++.h>
#define speed cin.tie(0)->sync_with_stdio(0)
#define ll long long
#define pii pair<int,int>
using namespace std;

int main(){
	speed;
	double n=0,r=0;
	const double t=800;
	while (n>=0){
		cin >> n;
		if (n<0) break;
		n+=r;
		if (n>=500)cout << ceil((n-500)/t) << "\n";
		else cout << 0 << "\n";
		r=max(0.0,n-t*(ceil((n-500)/t)));
	}
	return 0;
}