Sugar Mill Production Milestone Tracker
Sugar Mill Production Milestone Tracker
EasyArrays0% accepted
Ravi works at a sugar mill in Uttar Pradesh tracking hourly production. The mill has target of T tons per shift. He needs to find at which hour (position) the cumulative production first reaches the target, to know when machinery can be paused or shifted.
Approach
Given array of hourly sugar production (in tons) and target T, find minimum hours needed for cumulative production to reach T.
Input
6 100
20 25 30 15 20 25
Output
5
More Arrays problems
Browse all coding problems →solution.py
Loading editor...
Test 1
Test 2
Test 3
Press Run to test your custom input, or Submit to judge against all test cases.
Sign in to continue
Create a free account to run code, submit solutions and track progress.
- Free forever — no credit card
- 10+ languages with live execution
- Points, streaks & leaderboards