Subscribe to the weekly news from TrueShelf

## Toggling 100 doors

There are 100 doors numbered 1 to 100 in a row. There are 100 people. The first person opens all the doors. The second person closes all the even-numbered doors. The third person **changes the state** of every door (i.e., closes an open door, opens a closed door) whose number is a multiple of 3. The fourth person changes the state of every door whose number is a multiple of 4 and so on.

- Which doors are open after all the 100 people are done ?

**Source:**folklore