Submission

Status:

--------------------

Subtask/Task Score:

0/100

Score: 0

User: kawinavokiwi

Problemset: Slowly Express

Language: cpp

Time: 0.005 second

Submitted On: 2026-10-09 20:42:02

#include <bits/stdc++.h>

using namespace std;

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