Submission
Status:
PPPPPPPPPPPPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: Bermmmm
Problemset: Slowly Express
Language: cpp
Time: 0.003 second
Submitted On: 2025-10-07 01:38:18
#include <bits/stdc++.h>
using namespace std;
int main() {
int car,weight,remain;
remain = 0;
car = 0;
while(true) {
cin >> weight;
if (weight < 0) {
break;
}
weight += remain;
if (weight >= 500) {
while (weight >= 800) {
weight -= 800;
car ++;
}
if (weight >= 500) {
weight -= weight;
car ++;
}
}
remain = weight;
cout << car << endl;
car = 0;
}
return 0;
}