BrainDen.com - Brain Teasers
• 0

# Number of kids

## Question

There is a number of kids in a stadium, the kids form 7 groups which each group contains equal number of kids.
than 2 kids left the stadium, the remaining kids form 6 groups which each group contains equal number of kids.
than 3 more kids left the stadium, the remaining kids form 5 groups which each group contains equal number of kids.
than 5 more kids left the stadium, the remaining kids form 4 groups which each group contains equal number of kids.
than 7 more kids left the stadium, the remaining kids form 3 groups which each group contains equal number of kids.

If the initial number of kids is not more than 750 kids, how many kids in the stadium at the beginning ?

## Recommended Posts

• 0
Spoiler

350. Also happens to occur at 770, 1190, 1610... 350+n*420

50 groups of 7

348 left, 58 groups of 6

345 left, 69 groups of 5

340 left, 85 groups of 4

333 left, 111 groups of 3

##### Share on other sites

• 1

Let the starting number be N. As Sushma noted,

N % 7 = 0
N-2 % 6 = 0
N-5 % 5 = 0
N-10 % 4 = 0
N-17 % 3 = 0

From N % 7 = 0, we know N is divisible by 7.  From N-5 % 5 = 0, we also know it is divisible by 5, which means it's also divisible by 35 (the product of 7*5). This gives us only 21 numbers (35, 70, 105,...) below 750, but we can do better.

From N-2 % 6 = 0, we know N is even, giving us 10 numbers (70, 140, 210,...)

From N-10 % 4 = 0, and knowing all our numbers end in 0, we know the 10's place must be odd, giving us 5 numbers (70, 210, 350, 490, 630)

Since the number we are incrementing by at this point is not divisible by 3 (we are adding 140 each iteration), we can break them up into groups of three, test which one minus 17 is divisible by 3, and take that one for all other groups of 3.  In our example, {70, 210, 350} is the first group, meaning only the 3rd number in each set of 3, after subtracting 17, will be divisible by 3 (350), changing our increment to 140 * 3 (420). This gives the equation from tojo where any number that fits in 350 + 420*k will match our criteria.

##### Share on other sites

• 0

350 kids

number of kids should like :

kids %7  should be 0

(kids - 2) %6 should be 0

(kids - 5) % 5 should be 0

(kids - 10) % 4 should be 0

(kids - 17) % 3 should be 0

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.