Think You’re Ready for an IIM Interview? Solve This 100 Doors Challenge First!

Author Avatar
Feba P B Manager- Content
Updated on 2025-06-19 19:25:59
During IIM interviews, you are tested on more than just academia - you will be assessed on how you t... Read More
Think You’re Ready for an IIM Interview? Solve This 100 Doors Challenge First!

IIM Interview Question

IIM Question - There are 100 closed doors. A person walks past and toggles (opens/closes) doors in the following pattern: on the 1st pass, every door; 2nd pass, every 2nd door; 3rd pass, every 3rd door... After 100 passes, which doors remain open?

There are 100 doors closed in a row. A person walks by them and toggles the doors in the following way:

  • On the 1st pass they toggle every door (i.e., open all the doors).
  • On the 2nd pass they toggle every 2nd door (i.e., doors 2, 4, 6…).
  • On the 3rd pass they toggle every 3rd door (i.e., 3, 6, 9…).
  • ...
  • On the 100th pass, they only toggle the 100th door.
After 100 passes, which doors are open?

Here is the Step by Step Solution

Let’s analyze the puzzle logically:

1. What Does Toggling Mean?

To “toggle” a door means:

If it’s closed, toggle it to an open door. If it’s open, toggle it to a closed door.

2. What is the pattern behind the toggles?

A door gets toggled once for every number that the door number has:

For example:

Door 12 gets toggled by: 1, 2, 3, 4, 6, and 12 (because those numbers are factors of 12).

That is six toggles.

So, if a door is toggled an odd number of times, it will be open.

If a door is toggled an even number of times, it will be closed.

3. When will a door be toggled an odd number of times?

A door will be toggled an odd number of times if it has an odd number of factors.

However, most numbers have an even number of factors because factors come in pairs. For example:

12 → (1,12), (2,6), (3,4).

However, perfect squares have one factor that is not paired — the square root.

For example:

16 → (1,16), (2,8), and (4,4). The pair (4,4) is the same.

So, only perfect squares (ie, 1, 4, 9, 16...) will have an odd number of factors, and therefore will remain open.

Final Answer

After 100 passes, the doors that remain open will be perfect squares:
1² = 1
2² = 4
3² = 9
4² = 16
5² = 25
6² = 36
7² = 49
8² = 64
9² = 81
10² = 100

✅ Final list of open doors:

Door numbers: 1, 4, 9, 16, 25, 36, 49, 64, 81, 100
Total: 10 doors remain open.

Why do IIMs ask puzzles like this?

This particular puzzle is not only a test of mathematics but is also testing:

  • Pattern recognition
  • Structuring of thought
  • Ability to simplify a complex scenario
When it comes to interviews, your approach to solving the problem can be just as important as coming up with the right answer immediately, therefore, verbally articulating your thought process is important!


Recent Blog