MediumBrain TeasersAcceptance 62%

100 Lockers

GoogleTwo Sigma

100 lockers start closed. Person i (for i = 1…100) toggles every locker that is a multiple of i. After all 100 people pass, how many lockers are open?

Approach

How many times is locker n toggled?

Which numbers have an odd number of divisors?

Answer

Show the final answer

The answer is 10. Sign in free for the full worked solution and to check your own answer.

Related problems

More in Brain Teasers.