City of Burgerland

Have you ever heard of The Burgerland City? The city is full of burger shops. You will surely find s…

Click here to read the complete problem statement.


If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.

I have written a code for the problem which finds the shops having less capacity than cap.then it subtracts the capacity from cap and keeps adding all results of subtractions. Then it prints the sum. But the code gets wrong answer. Where is the mistake in my logic?