100 doors

1,443.8K Views

There are 100 doors, all closed. In a nearby cage are 100 monkeys. The first monkey is let out, and runs along the doors opening every one. The second monkey is then let out, and runs along the doors closing the 2nd, 4th, 6th,… all the even-numbered doors. The third monkey is let out. He attends only to the 3rd, 6th, 9th,… doors (every third door, in other words), closing any that is open and opening any that is closed, and so on. After all 100 monkeys have done their work in this way, what state are the doors in after the last pass, which doors are left open and which are closed ?

Share
Nishant Guru Asked on 31st July 2015 in Interview Puzzles.
Add Comment

  • 1 Answer(s)

    The doors that are left open are a the numbers that have a perfect square root : 4,9,16,25,36,49,64,81,100

    Because they have odd number of dividers, and that means that the last monkey that can get to the door will open it.

    Moshe Expert Answered on 9th January 2023.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.
  • More puzzles to try-