60-Day Plan62 / 143
MediumBrain Teasers

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?

Hints

How many times is locker n toggled?

Which numbers have an odd number of divisors?

Sign in to reveal the full worked solution, check your answer instantly, and track your progress with spaced-repetition review.