26 Feb '07 12:18

A high school has a strange Headmaster. On the first day, he has his pupils perform an odd opening day ceremony:

There are one thousand lockers and one thousand pupil in the school. The Head asks the first pupil to go to every locker and open it. Then he has the second pupil 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 pupil does this to every fourth locker, and so on.

There are one thousand lockers and one thousand pupil in the school. The Head asks the first pupil to go to every locker and open it. Then he has the second pupil 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 pupil does this to every fourth locker, and so on.

**After the process is completed with the thousandth pupil, how many lockers are open?**