How many light bulbs will be on?

A room has 100 light bulbs numbered 1 to 100. All the bulbs are initially in the "off" state. 100 persons go into the room one after the other. The first person changes the state ("off" to "on") of all the bulbs. The second person changes the state (switches it on if it is off, or switches it off if it is on) of all the bulbs which have even number (2,4, 6...100). The third person changes the state of all the bulbs which have a number divisible by 3 and so on. That is, the n n th person changes the state of all the bulbs which have a number divisible by n n .

How many light bulbs will be in the "on" state once all the 100 persons have done their job?


The answer is 10.

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.

1 solution

The number of factors which a number has, decides whether the bulb with that number is on or off. Any bulb with a number having even number of factors will be finally in the off state. The only numbers which have odd number of factors are squares. Therefore the bulbs numbered 1,4,9,16,25,36,49,64,81, and 100 will be in the on state and all other bulbs will be in the off state.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...