# Locker Puzzle : Maths Puzzle

A school had a strange principal. On the first day, he has his students perform an odd opening day ceremony:

There are one thousand lockers and one thousand students in the school. The principal asks the first student to go to every locker and open it. Then he has the second student go to every second locker and close it. The third goes to every third locker and, if it is closed, he opens it, and if it is open, he closes it. The fourth student does this to every fourth locker, and so on. After the process is completed with the thousandth student, how many lockers are open?

Try and solve this logical maths puzzle yourself.

5 Comments

The answers will be all the perfect squares because perfect squares have odd no.s of factors.

Yes Mohit is correct.

I tried upto 10, and found that the doors remaining open are the ones which are perfect squares.

So it had to be true for 1000 also.

@Mohit: can u explain how you got this answer.

31 : Number of perfect squares between 1 and 1000.