Submission

Status:

PPPPPPPPPPPPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: ssens3

Problemset: Slowly Express

Language: cpp

Time: 0.002 second

Submitted On: 2026-10-05 08:23:07

#include <iostream>
using namespace std;
int main(){
    int l = 0;
    while (true){
        int w, c = 0;
        cin >> w; if (w < 0) break;
        w += l;
        c += w / 800; w %= 800;
        if (w >= 500){c++; l = 0;}
        else l = w;
        cout << c << "\n";
    }
}