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.
(i) No of closed lockers = No of non-perfect square numbers from 1 to 1000 = 1000 - 31 = 969