The Locker Problem

The Locker Problem


Every day, 100 students enter a school that has 100 lockers. All the lockers are closed when they arrive.

Student 1 opens every locker.

Student 2 closes every second locker.

Student 3 changes the state of every third locker, i.e., he opens it if it is closed and closes it if it's open.

Student 4 changes the state of every fourth locker and so on... so that student  changes the state of every  locker.

Once all 100 students take their turns, how many lockers will be left open?