Submission
Status:
--P---P-P--P----PP--
Subtask/Task Score:
30/100
Score: 30
User: thanat
Problemset: Slowly Express
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-05 21:31:04
#include<iostream>
using namespace std;
int main(){
int a,b,c;
b=0;
c=0;
while(true){
cin>>a;
if(a<0){
break;
}
if(a<500&&a+c<500){
cout<<"0"<<"\n";
c=c+200;
}
else{
a=a+c;
while(a>=500){
a=a-800;
b=b+1;
}
cout<<b<<"\n";
c=0;
b=0;
}
}
}