Question 9
Logic · Number theory BDMO 2021 Selection · Dhaka
In a hotel, there are 100 rooms in a row, numbered 1 through 100 in order. Initially, all the doors of the rooms are closed and the hotel manager wants to open them all. But the way he wants to do it is somewhat strange. First, he opens every other door, starting from room 1. So, he opens and so on. Then he goes back to the beginning and again opens every other unopened door. So, this time he opens and so on. He continues in this way until he opens all the doors. What is the number of the last door he opens?