Reply
Wed 29 Dec, 2004 10:44 am
there were 1000 students and 1000 locks
the teacher told the 1st student to open every lock 1 2 3 4 5 6 7 8 ........
then told the 2nd student to close every 2 locks 2 4 6 8 10 12 .......
then told the 3rd to open every 3 locks 3 6 9 12 15 ....... and if found an open lock leave it open
the 4th ... 4 8 12 16 20 ...........
and continued this way all over the 1000 students
so when finished
how many locks were still opened?
499?
<edited for correction>
No, I think 500 is correct.
All of the odd numbered locks will be open.
All of the even numbered locks will be closed.
no, the answer is that all perfect squares will be open. Cant remember if that includes the first... I think it doesnt. The key is how many times each one gets opened/closed. Because it is advancing by multiples, anything with an even number of factors will end up closed. The only numbers without an even number of factors are perfect squares, so only they would be open. So, i think 30 lockers would be open.
Chidori wrote:no, the answer is that all perfect squares will be open. Cant remember if that includes the first... I think it doesnt. The key is how many times each one gets opened/closed. Because it is advancing by multiples, anything with an even number of factors will end up closed. The only numbers without an even number of factors are perfect squares, so only they would be open. So, i think 30 lockers would be open.
This is not correct given the wording of the problem. If each person changed the state of the locks they visited (close if opened, open if closed), then this would be correct. The way the problem is worded, half are open and half are closed.
the final state of the lock is affected by the last one who passed
the last one passes is the student with the same number of the lock
so
All of the odd numbered locks will be open.
All of the even numbered locks will be closed.