Submission

Status:

PPP---P----P---PP--P

Subtask/Task Score:

40/100

Score: 40

User: hmmm

Problemset: Slowly Express

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-09 21:00:16

#include <bits/stdc++.h>

using namespace std;

int main(){
    int n;
    int x = 0;
    int y = 0;
    while(cin >> n){
        
        if(n>0){
            n = n+y;
            if(n <= 800 && n>=500){
                x = 1;
                n = 0;
            }else{
                x = n/800;
                n%=800;
            }
            if(n%800 >= 500){
                x += 1;
                y = 0;
            }else{
                y = n%800;
            }
            cout << x <<  '\n';
        }else{
            break;
        }
        
    }
}