
In a warehouse, one hundred lockers are lined up, numbered 1 to 100. At first they are all closed.
One hundred people then come one at a time and operate the lockers. The 1st person opens every locker once. The 2nd person toggles the lockers that are multiples of 2: closes each one that is open and opens each one that is closed. The 3rd person toggles the multiples of 3 in the same way. This continues up to the 100th person.
When the 100th person had finished operating only locker 100, the jewels turned out to be in a locker that was left open.
How many lockers are open at the end in total?
If you get stuck, open the hints one at a time, in order.
How many people operate locker n?
What kind of number has an odd number of divisors?
How many such numbers are there from 1 to 100?
How many lockers are open at the end in total?
Choose the answer closest to the truth.
10
The answer is 10.
Locker n is operated by the people whose numbers are divisors of n. If it is operated an odd number of times, it ends open. The only numbers with an odd number of divisors are square numbers (because divisors normally come in pairs).
The squares from 1 to 100 are 1, 4, 9, 16, 25, 36, 49, 64, 81 and 100, ten in all. Only these ten lockers are open at the end.
You try to follow all hundred people’s operations and miss the structure of the number of divisors.
The cases on this site are fictional puzzles created for entertainment. Any resemblance to real people, organizations or events is coincidental.
© Unsolved Files