Problem 3. A natural number is written on the board. Nikolai noticed that he can append a digit to the right of it in two ways so that the resulting number is divisible by 9. In how many ways can he append a digit to the right of the given number so that the resulting number is divisible by 3?
Answer: 4 ways.

Solution. Note that the difference between the two numbers "noticed" by Nikolai is less than 10, but is divisible by 9. Therefore, this difference is 9. This is only possible if the appended digits are 0 and 9. Then it is easy to see that for divisibility by 3, in addition to these two digits, the digits 3 and 6 can also be appended. In total, there are 4 ways.

## Criteria

4 6. A complete and justified solution is provided.

In the absence of a correct solution, the highest applicable criterion from those listed below is used

2 6. It is proven that Nikolai could only append 0 or 9 at the beginning.