lets count from left. Number each position as 1, 2, 3, 4, 5...until 1000
for each position except for 1, find numbers that can divide the position.
The numbers are even, but every two times of toggle makes the lock unlocked.
By the way, your answer to my question is wrong. :-)