You are not logged in.
Pages: 1
Ten students enter a locker room that contains 10 lockers. The first student opens all the lockers. The second student changes the status (from close to open or vice versa) of every other locker, starting with the second locker. The third student then changes the status of every third locker. In general, 1<k<=10, the kth student changes the status of every kth locker. After the tenth student has gone through the lockers, which lockers are left open?
My solution is lockers 1, 4 and 9.
Offline
Your solution is correct.
The lockers that are open after all students have finished are the ones that have been changed an odd number of times. The number of times a locker is changed is equal to the number of factors that the locker's number has.
Hence, the lockers that finish open are the ones with an odd number of factors.
(Otherwise known as the square numbers)
Why did the vector cross the road?
It wanted to be normal.
Offline
Pages: 1