Joseph decided to play a game with 999 different players.
Setup :- There are 999 buckets kept in a row. Apart from these, the are two boxes, box-1 containing 999 red balls and box-2 containing 999 green balls.
Game :-
Player -1 distributes all red balls from, box-1 from into all the 999 buckets each receiving one ball.
Player -2 removes all balls from every second bucket and return them to box-1.
Player -3 removes all balls from every third bucket and return them to box-1, but if in the process a bucket is already empty, then he keeps a red ball in it. (Example - The box would be empty because player-2 had already removed the ball from it in the previous process.)
Player -4 removes all balls from every fourth bucket and returns them to box-1, but if in the process a bucket is already empty, then he keeps a red ball in it.
This process is continued till all the 999 players have their chance.
It is now observed that some buckets are empty in the row.
Now, Joseph has a task to keep a green balls in all these empty buckets.
In the final arrangement, how many green balls are present?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Observe that for the n t h bucket if the plans are executed it will remain empty only if it an odd number of players modify it.
For example - on first modification, the box would become empty. On second modification it would be filled. On third modification, it would get empty again and so on.
So, an n t h bucket will remain empty if and only if n has odd number of factors other than 1 i.e. n has an even number of factors.
Now, all non-perfect squares have even number of factors. And all perfect squares have odd number of factors.
So, all the perfect square-numbered buckets will not be empty. There are 3 1 perfect squares in 1-999 both inclusive. So 9 9 9 − 3 1 = 9 6 8 buckets would be empty. All these buckets would get a green ball.
So, in the final row there would be 9 6 8 green balls.