Question: 1 Problem Statement You are on a magical adventure where a series of events talkes place. These events are numbered from 1 to Nend each

1 Problem Statement
You are on a magical adventure where a series of events talkes
place. These events are numbered from 1 to Nend each hastis om
special story that lasts for a certain amount of time, lets say if
seconds.
At the beginning of our journey, the first event starts, followed by
the second, the third, and so on, until we reach the last crent, it
Once the final event is over, we start all over again with the fist
event. There are no gaps between the events - as one ends, the
next begins right away.
Nowatet's say T seconds have passed since we started this megat
journey. Which event is happening at that momenta hnd how miny
seconds have passed since that event started?
Input Format
NT -N denotes total number of events, T denotes the secents
since journey started
A1, A2,..., AN: denotes the durations of each event in seands
output Format
print an integer representing the event that is happering at enaty
T seconds
print an integer representing the stat of thent

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!