Submission

Status:

PPPPPPPPPPPPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: UNJE0o

Problemset: Slowly Express

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-11 16:19:43

#include <bits/stdc++.h>
#define en '\n'
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);

    int n,sum = 0,truck;

    while(true){
        cin >> n;
        sum += n;
        if(n < 0) return 0;
        // cout << sum << " ";
        truck = 0;

        int truck = sum/800;
        sum %= 800;
        if(sum>=500){
            truck++;
            sum = 0;
        }
        cout << truck << en;
    }

}