In the mentioned problem the value of N is not given .
N is not required !
look at the input format.
tink about it again we are required to make the largest squares that doesn’t mean we can waste cloth, so for a 30x40 cloth largest would be 30x30 but we don’t want any cloth to be wasted. just keep this in mind and you can find n and the length of the side of the square on your own.
Thanks a lot. I got it now. I had misunderstood previously.