Submission

Status:

PPPPPPPPPPPPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: chillxvtkz

Problemset: Slowly Express

Language: cpp

Time: 0.003 second

Submitted On: 2025-10-07 10:23:14

#include <iostream>
using namespace std;

int main() {
    int x;
    int sum = 0;

    while (true) {
        cin >> x;
        if (x < 0) break;

        sum += x;
        int y = sum / 800;
        int remain = sum % 800;

        if (remain >= 500) {
            y++;
            sum = 0;
        } else {
            sum = remain;
        }

        cout << y << endl;
    }
    return 0;
}