Submission

Status:

PPPPPPPPPPPPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Karatat007

Problemset: Slowly Express

Language: cpp

Time: 0.002 second

Submitted On: 2026-10-04 08:18:03

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

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

    int curr = 0;
    while(1){
        int n;
        cin >> n;
        if(n < 0) break;
        curr += n;
        int ans = 0;
        if(curr >= 800){
            ans += curr/800; 
            curr = curr%800;
        } 
        if(curr >= 500){
            ++ans;
            curr = 0;
        }
        cout << ans << '\n';
    }
}