Originally Posted by

**flyingsquirrel** *781 254 963* and *187 254 963*

I solved the problem this way :

If the 9 digits of the code are a_1, a_2, ... , a_9 then the number a_8a_9 is a multiple of 9. As a_7a_8 is a multiple of 8, a_8 has to be even hence a_8a_9 is one of the following numbers : 27, 45, 63, 81.

If a_8a_9 = 27 then a_7a_8 is a multiple of 8 which last digit is 2 hence it is either 72 (impossible since a_9=7) either 32. With a_7a_8=32, one has necessarily a_6a_7=63. (only multiple of 7 which ends by 3 and has two digits) As a_4a_5 is a multiple of 5, a_5 is 0 (impossible) or 5. Since there is no multiple of 6 which starts by 5 and ends by a_6=3 the case a_8a_9=27 is impossible.

If a_8a_9=45 then ...

This is really tedious, is there a better method to find the answer ?