Submission
Status:
--------------------
Subtask/Task Score:
0/100
Score: 0
User: I_am_me
Problemset: Slowly Express
Language: c
Time: 0.002 second
Submitted On: 2025-09-25 16:31:19
#include <stdio.h>
#include <stdio.h>
#include <string.h>
int main()
{
int w = 0,ro=0,car[500],count = 0;
while(w>=0) {
scanf("%d",&w) ;
int overalls = w+ro ;
int cars = (overalls-(overalls%800))/800;
if (overalls%800>=500) {
ro = 0;
cars++;
}
else if(overalls%800<500) ro = overalls%800 ;
car[count] = cars ;
count+=1 ;
printf("\n%d",cars) ;
}
for(int i = 0;i<count-1;i++) {
printf("%d\n",car[i]) ;
}
}