A teacher while evaluating the answer sheets of some 100 4th grade students found some similarities in most of the answers. Startled at this he asked the students about it. But none of them answered. At this he gave a punishment to all of them and to find out the final result of the exercise given as the punishment.

The exercise is as follows

The school has 100 lockers. One by one each student has to go the lockers and open them in the following pattern:

Student 1 opens all the lockers

Student 2 goes and closes every second locker

Student 3 goes and "changes the state" of every third locker i.e. if its open , close etc and vice versa.

Student 4 changes the state of every 4th locker.

.

.

.

.Student n changes the state of every nth locker

This goes on for all 100 students.

They have to tell which all lockers are open at the after 100th student is done with his task.

Now he gave one liberty to the students , if they can think of the correct solution, they need not run to the lockers and perform the task physically. But if they do it wrong they have to do that everyday.

Please help the students by telling the solution and find out which all lockers are open at the after 100th student is done with his task.

---