Submission

Status:

PPPPPPPPPPPPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: asdasd

Problemset: Slowly Express

Language: cpp

Time: 0.003 second

Submitted On: 2025-10-12 23:55:36

#include <stdio.h>
int main(){
    int weight;
    int temp=0;
    int deliv[1000];
    int count=0;
    while(1){
        scanf("%d",&weight);
        if(weight<0){
            break;
        }
        int total = weight+temp;
        deliv[count] = total/800;
        temp = total%800;
        if(temp>=500){
            deliv[count]++;
            temp=0;
        }
        count++;
    }
    for(int i = 0 ; i<count ; i++){
        printf("%d\n",deliv[i]);
    }
}