A school has a long hallway of lockers numbered 1, 2, 3, and so on up to 1000. Now, consider the following practice
After this, what is the state of locker numbered ?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The number of times a locker is touched is equal to the number of factors of the locker number. For example, locker number 6 is touched by student 1,2,3 and 6.
Therefore if the number of factors is even then the locker is open. And if the number of factors is odd then the locker is closed.
We observe that the numbers which are perfect squares have odd number of factors. Therefore only the doors numbered 1,4,9,25,36, ....., 961 remain closed.