Whether the locker is open or not depends on the number of times it is accessed If it is accessed odd number of times then it is open while if it is accessed even number of times then it is closed How many times a locker will be accessed depends on the locker no If it contains odd number of factors then it will be open and if it contains even number of factors Then it will be closed We know that a perfect square contains odd number of factors while a non-perfect square contains even number of factors Thus the lockers with perfect square number will be open and the number of these perfect squares from 1 to 1000 determines the no of open lockers
(iii) The 31 perfect squares (the last being 312=961) will be open while the lockers from 971 to 1000 is yet to be accessed last time so they all are open The total being = 31 + 30 = 61