Submission

Status:

-PP---P----P----P---

Subtask/Task Score:

25/100

Score: 25

User: nunos

Problemset: Slowly Express

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-09 21:51:39

#include <iostream>
using namespace std;

int main() {
    int num=0;
    int car=0;
    int temp=0;
    while(num>=0){
        car = 0;
        cin>>num;
        temp +=num;
        if(temp>=800){
            car +=(temp/800);temp =(temp%800);
        }
        if(temp>500){
            car +=(temp/500);temp =(temp%500);
        }
        if(num>0)cout << car <<"\n";
    }
    return 0;
}