Two are writing a) a 30-digit; b) a 20-digit number, using only the digits 1, 2, 3, 4, 5. The first writes the first digit, the second writes the second, the third is written by the first, and so on. Can the second ensure that the resulting number is divisible by 9, if the first tries to prevent it?
a) The second player's strategy: write a digit so that the sum of it and the previous digit equals 6. Since $15 \cdot 6$ is divisible by 9, the resulting 30-digit number will be divisible by 9.

b) The first player's strategy: start by writing 1, and then write a digit so that the sum of it and the previous digit equals 6. In this case, before the second player's last move, the sum of the digits will be 55, and he will not be able to achieve his goal.

## Answer

a) Can; b) cannot.