Submission
Status:
Compilation Error
Subtask/Task Score:
Score: 0
User: chillxvtkz
Problemset: Slowly Express
Language: cpp
Time: 0.000 second
Submitted On: 2025-10-07 10:05:19
#include <iostream>
#include <cmath>
using namespace std;
int main() {
int x,y,sum=0;
while (1) {
cin >> x;
if (x < 0) break;
sum = x+sum;
y = floor(sum/800);
sum = sum-(800*floor(sum/800));
if(sum>500){
y = y+y = floor(sum/500);;
sum = 0;
}
cout << y<<endl;
}
}