Naruto and One Shot (Graph ques.)

So, according to the question, we are asked to find the maximum number of pages each book can have. We know that any book cannot contain pages from different types of books and we also the number of pages of each type of book we have initially.
Let us take one book, say X. Let book X initially have pages p. Now, to find out the number of books we can make of type X having say Y number of pages, we can simply do p/Y.

Let a book have 200 pages initially, then the number of different books of pages 25 that can be made out of this book is 8 (200/25).

So, now we just find the sum of books of each kind we can get when we consider each book having mid number of pages. Then, just check if this sum is greater than or equal to the number of children.

1 Like

thanks you bro for giving your precious time and explaining the logic in a beautiful way :slight_smile:
now i am able to do this because of you and guys like yours :slight_smile:
THANK YOU SO MUCH :slight_smile:

1 Like

THANK YOU @kanisht09 for helping me :slight_smile: Encoding August 20 Problem Name-Notebook Distribution this was really helpful :slight_smile:

1 Like