Submission
Status:
--------------------
Subtask/Task Score:
0/100
Score: 0
User: chin.peerapatAtgmail.com
Problemset: Slowly Express
Language: cpp
Time: 0.002 second
Submitted On: 2026-09-26 09:16:04
#include <bits/stdc++.h>
using namespace std;
int a=0,truck,w=0;
int main(){
while(cin>>a){
if(a<0){
break;
}
a+=w;
w=0;
if(a>=800){
truck+=a/800;
w+=a%800;
a%=800;
}
if(a>=500){
truck++;
}
cout << truck;
a=0;
truck=0;
}
}