+ 3
How does this code work?
Sample input: 5 5 1 0 15 1 0 20 1 2 78 2 2 0 3 0 Sample output: 78 2 Explanation: There are 5 shelves and 5 requests, or queries. - 1 Place a 15 page book at the end of shelf 0 . - 2 Place a 20 page book at the end of shelf 0 . - 3 Place a 78 page book at the end of shelf 2 . - 4 The number of pages in the 0th book on the 2nd shelf is 78. - 5 The number of books on the 0th shelf is 2. https://code.sololearn.com/cX8498IfQAty/?ref=app
0 Resposta