Submission

Status:

PPPPPPPPPPPPP-PPPPPP

Subtask/Task Score:

95/100

Score: 95

User: Whatthepoop

Problemset: Slowly Express

Language: c

Time: 0.003 second

Submitted On: 2025-10-12 23:22:46

#include <stdio.h>

int main() {
    long long stock = 0, num;
    int car;

    while (1) {
        scanf("%lld", &num);
        if (num < 0) break;

        stock += num;
        car = 0;

        if (stock >= 800) {
            car += stock / 800;
            stock %= 800;
        }

        if (stock > 500) {
            car++;
            stock = 0;
        }

        printf("%d\n", car);
    }

    return 0;
}