# 2. Option 1

Masha wrote the number 547654765476 on a piece of paper. She erased several digits so that the resulting number is the largest possible multiple of 9. What is this number?
Answer: 5476547646.

Solution: The sum of the digits of the original number is $3 \cdot(7+6+5+4)=66$. From the divisibility rule by 9, it follows that the sum of the erased digits must give a remainder of 3 when divided by 9. It is impossible to select digits with a sum of 3. Digits with a sum of $3+9=12$ can be chosen, and with a sum of $12+9=21$ or more, at least 3 digits can be taken. Of the two numbers, the larger one is the one with more digits, so you need to remove two digits with a sum of $12-7$ and 5 or 6 and 6. Of the two ten-digit numbers, the larger one is the one with larger digits in the higher places. Therefore, you need to erase the last "5" and the last "7".

## Variant 2

Masha wrote the number 564756475647 on a piece of paper. She erased several digits so that the resulting number is the largest possible multiple of 9. What is this number?

Answer: 6475647564.

## Variant 3

Masha wrote the number 576457645764 on a piece of paper. She erased several digits so that the resulting number is the largest possible multiple of 9. What is this number?

Answer: 7645764564.

## Variant 4

Masha wrote the number 675467546754 on a piece of paper. She erased several digits so that the resulting number is the largest possible multiple of 9. What is this number?

Answer: 7547546754.

## Variant 5

Masha wrote the number 457645764576 on a piece of paper. She erased several digits so that the resulting number is the largest possible multiple of 9. What is this number?

Answer: 4764576456.