Submission

Status:

PPPPPPPPPPPPP-PPPPPP

Subtask/Task Score:

95/100

Score: 95

User: bananakung

Problemset: Slowly Express

Language: cpp

Time: 0.003 second

Submitted On: 2025-07-10 20:47:29

#include<iostream>
using namespace std;
int main()
{
	int kg[100]={},truck=0,day=1,left=0;
	while(kg[day-1]>=0)
	{
		cin>>kg[day];
		day++; 
	}
	for(int i=1;i<day-1;i++)
	{
		truck=0;
		int total=kg[i]+left;
		while(total>500)
		{
		//	cout<<total<<" ";
			if(total>=800) 
			{
				truck++;
				total-=800;
			}
			else
			{
				truck++;
				total-=total;
			}
			
		}
		cout<<truck<<endl;
		left=total;
	}
	
	
}