# 100 Lockers. Riddle 15 Lvl Easy?

Suppose you're in a hallway lined with 100 closed lockers. You begin by opening every locker. Then you close every second locker. Then you go to every third locker and open it (if it's closed) or close it (if it's open). Let's call this action toggling a locker. Continue toggling every nth locker on pass number n. After 100 passes, where you toggle only locker #100, how many lockers are open?

Nth means "ninth" by the way :3
My apologies, as someone pointed out to me, nth doesn't mean ninth, it's actually like a variable. >.<
I had to go back and look it up to make sure. So pay the first update no mind.

0|0
1|5

• After quite some thinking i got it.

Here's what happens.

First, let's agree on the fact that prime numbers will be closed. Because the only factors they have are 1 and the number itself. So, if door opens at 1 , it has to close at the number itself.

Secondly, all other numbers will have factor , which can be grouped into pairs , for example take number 24, all possible factors are , 1,2,3,4,6,8,12,24 which can be grouped as , 1x24 , 2x12, 3x8, 4x6. If door opens at 1 it will go like
open close open close open close open close. It closes at the number itself.

But the exception lies in perfect squares where you have 5x5, 6x6 where u cannot account for 5 or 6 two times, therefore the door remains open.

1,4,9,16,25,36,49,64,81,100 will remain open.

1|0
0|0
• and nth doesn't mean ninth , it means any general number satisfying the equation. It's like a variable.

• Show All
• ty for MHO

• You're welcome