[Solution] The Last Levels CodeChef Solution
Chef is playing a videogame, and is getting close to the end. He decides to finish the rest of the game in a single session.
There are levels remaining in the game, and each level takes Chef minutes to complete. To protect against eye strain, Chef also decides that every time he completes levels, he will take a minute break from playing. Note that there is no need to take this break if the game has been completed.
How much time (in minutes) will it take Chef to
👇👇👇👇👇
complete the game?
Input Format
- The first line of input will contain a single integer , denoting the number of test cases.
- The first and only line of input will contain three space-separated integers , , and .
Output Format
For each test case, output on a new line the answer — the length of Chef's gaming session.
No comments:
Post a Comment