Problem 4.5. Anton guessed a three-digit number, and Lesha is trying to guess it. Lesha sequentially named the numbers 109, 704, and 124. Anton noticed that each of these numbers matches the guessed number in exactly one digit place. What number did Anton guess?
Answer: 729.

Solution. Note that the first and third numbers have a common hundreds digit 1, the first and second have a common tens digit 0, and the second and third have a common units digit 4.

Suppose the first digit of the guessed number is 1. Then the first and third numbers no longer have common digits with the guessed number in the same place, so the second digit is neither 0 nor 2, and the third digit is neither 4 nor 9. But then the second number cannot have a common digit with the guessed number in the same place. This leads to a contradiction, so the first digit is not 1.

Reasoning similarly, we find that the second digit is not 0 (otherwise the third number would not have a common digit with the guessed number in the same place), and the third digit is not 4 (otherwise the first number would not have a common digit with the guessed number in the same place).

Thus, the second number can only have the common hundreds digit 7 with the guessed number, the third number can only have the common tens digit 2, and the first number can only have the common units digit 9, i.e., the guessed number is 729.