The problem is asking the final state of each locker door after all students have finished their turn.
Each student will change the open/close state of the lock when they touch it.
The locker door's final state is then essentially decided by the number of students who touched it, divide by 2 since there are only 2 alternating state.
Each student only touches the locker number that is a multiple of their own #.
So this is asking the factors of each whole number from 1-1000, if the number of factors is even the door stays opened, if it is odd then the door stays closed.
Take locker 999 as example, it is divisible by 1, 999 naturally,
then /3 gets 333,
then /3 gets 111,
then /3 gets 37, and 37 is a prime number.
So the factors are 1, 3, 37, 111, 333, and 999, so after 6 state alterations the door will stay as "opened", at its initial state.
Unfortunately, I could not find a universal equation to describe the phenomena; I could only decide each lock's state by individually assessing its number of factors.
No comments:
Post a Comment