top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

100 Locker Puzzle

+6 votes
394 views

You are standing in a school hallway lined with 100 closed lockers. You then open all 100 lockers. After this, you then close every 2nd locker (so the 2nd, 4th, 6th…98th and 100th are all closed). Then, you go to every third locker and open it if it is closed or close it if it is open (let’s call this toggling the locker for our discussion). You proceed to toggle every nth locker on pass number n. So, for example, on pass number 16 – you will toggle every 16th locker. After your hundredth pass of the hallway, in which you toggle only locker number 100, how many lockers are now open? In a hall with x lockers, how many lockers remain open after pass number x?

posted Jan 18, 2014 by Neeraj Pandey

Share this puzzle
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Only 10 lockers will remain open in case of 100 lockers.

Logic:
Let only 1 locker-
will end opened.

Let only 2 locker-
series:
open,open
close
Result: 1 is open

let 3 locker
series:
open,open,open
close
close
Result- 1 is open

let 4 locker
series:
o,o,o,o
c, c
c
0
Result: 1 and 4 will be open

.........................
...................
......................

similarly you can check for others
Only perfect squares will be opened between 1 and 100.

answer Jan 19, 2014 by Atul Mishra



Similar Puzzles
+4 votes

A new prison has been built. It holds exactly 100 prisoners. Each prisoner is held in a solitary room with no way of communicating with the other prisoners, or anyone on the outside. Each day, the warden selects one prisoner at random, and escorts the selected prisoner to a central room for one hour. There is nothing in the central room except a light switch that controls a light bulb installed in the ceiling, which is visible but out of reach. While a prisoner is in the central room, they are allowed to turn the light switch on or off. They can also decide to tell the warden that they are certain that all 100 prisoners have been in the room. For simplicity's sake, assume the light in the central room is off before the first prisoner goes in.

If they are correct then everyone will be set free, but if they are not correct, then everyone will be executed. So, it is essential that they only talk to the warden when they are 100% positive that they are correct.

All 100 prisoners are allowed to gather together for one hour before they are put in prison to discuss their strategy for getting out. Can you come up with a plan that guarantees success (eventually)?

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...