kapilnitt Wrote:6 numbers in the set are in sequence so the reminder will also come in sequence and if out of 6 reminders 5 are same, it is only possible when count goes from 0 to 5.
Thanks
Kapil
right idea. not quite the right numbers.
if you had remainders 0 through 5, that would be six, not five, different remainders (count them: 0, 1, 2, 3, 4, 5).
the only way to get exactly five different remainders is if n = 5, so that the remainders (from dividing consecutive integers) repeat in the order 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, ...
this way, if you divide six consecutive integers by 5, you'll see five different remainders (0, 1, 2, 3, and 4). you'll see exactly one of them twice, but that's irrelevant for the purpose of counting how many
different remainders show up.
if n is less than 5, then there aren't even five remainders possible in the first place.
if n is greater than 5, all six of the remainders will be different. (try it yourself.)