Task 7.5. Two people are writing, a) a 60-digit; b) a 14-digit number, using only the digits $1,2,3,4,5$. The first digit is written by the first person, the second by the second, the third by the first, and so on. Can the second person ensure that the resulting number is divisible by 9, if the first person tries to prevent it? (7 points)
# Solution.

Answer. a) Can; b) cannot.

a) The second player's strategy: write a digit so that the sum of it and the previous digit equals 6. Since (60/2)*6 is divisible by 9, the resulting 60-digit number will be divisible by 9.

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

Comment.