Submission

Status:

PPPPPPPPPPPPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: NovemNotes

Problemset: Slowly Express

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-15 16:17:32

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

int main(){
    ios_base::sync_with_stdio(false);cin.tie(NULL);
    int sum=0;
    int x;
    while(cin >> x){
        if(x<0)break;
        sum+=x;
        int ans=0;
        if(sum>800){
            ans+=(sum/800);
            sum%=800;
        }
        if(sum>=500){
            ans++;
            sum=0;
        }
        cout << ans << "\n";
    }
    return 0;
}
/*
200  
200  
200  
9000  
0  
2800  
-50
*/