Every day, students enter a school that has lockers. All the lockers are closed when they arrive.
Student opens every locker.
Student closes every second locker.
Student changes the state of every third locker i.e. he opens it if it is closed and closes it if its open.
Student changes the state of every fourth locker and so on... so that student changes the state of every locker.
One day several students are absent. Regardless, those present complete the procedure and simply skip the students who are absent. For e.g. if student is absent, then nobody changes the state of every third locker.
Satyen Nabar discussed the problem when one door was opened and all others were closed.This inspired me and tried to interpret the situation when 2 doors are opened and all the others are closed.
I took two cases
Here after 100th operation locker number were opened and all others were closed.I found that and ,,, student nos who were absent.So total students were absent.
In this case after 100th operation locker number were opened and all other were closed.Here I found that students were present.Student no and (which is an exception).So in this case students were absent.
Anyone please confirm these two answers and help me to generalize the problem.