8. (4 points) With the number written on the board, the following operation is allowed: erase two adjacent digits whose sum does not exceed 9, and write this sum in their place. Initially, a 200-digit number $12341234 \ldots 1234$ was written. The specified operation was performed on the number on the board until it was no longer possible. What is the largest number that could end up on the board as a result

#
# Answer:

$64 \ldots 64$ - a 100-digit number.

## Solution:

The sum of the digits of the original number is $(1+2+3+4) \cdot 50 = 500$. The sum of the digits of the final number is the same.

We will divide the digits of the final number into pairs: the first with the second, the third with the fourth, and so on. The last digit may remain without a pair. The sum of the digits in each pair is at least ten.

![](https://cdn.mathpix.com/cropped/2024_05_06_60be8e050803d5e51e7dg-04.jpg?height=71&width=1785&top_left_y=2763&top_left_x=107)
Among numbers with fewer digits, the answer should primarily be sought among them.

If the number has exactly 100 digits, and the sum of the digits in any pair is greater than 10, then the total sum of the digits is greater than 500. Therefore, in any 100-digit number that we can obtain, the sum of the digits in each pair is exactly 10.

Note: The statement that in each such number the sum of adjacent digits is 10 is generally incorrect: for example, the number $376464 \ldots 64$ can be obtained, in which this condition is violated.

In each pair, we need to maximize the first digit and minimize the second. Since each pair of digits is obtained by the operations specified in the condition from 1234, the second digit is not less than 4, and the largest variant for each pair is 64, from which we get the answer.

## 11th Grade

## 2nd Variant