Submission

Status:

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

Subtask/Task Score:

45/100

Score: 45

User: helloskibidi

Problemset: Slowly Express

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-05 16:32:26

#include <bits/stdc++.h>
using namespace std;

int main(){
    int a = 1,money = 0;
    while(money>=0){
        int car =0;
        cin >> a;
        if(a<0) return 0;
        money+=a;
        while(money>=800){
            car++;
            money-=800;
        }
        if(money > 500){
            car++;
            money-=500;
        }
        cout << car << "\n";
    }
}