6. (4 points) With the number written on the board, one of the following operations is allowed:
1) Replace the original number with the difference between the number obtained by removing the last four digits and the number formed by the last four digits (possibly written in an improper form - with leading zeros; the difference is taken as positive - from the larger number subtract the smaller one).
2) If the original number has three consecutive digits $a>0, b<2$ (in that exact order), it is allowed to replace them with the digits $a-1, b+3$ and $c-3$ respectively. If zeros appear at the beginning of the number as a result, they are discarded.

Initially, the number consisting of one hundred fives was written on the board. In the end, a two-digit number remained. What exactly is it?
Answer: 80 or 66.

## Solution:

Let the number $10000 a+b$, where $b<10000$, undergo the first operation. Then it turns into $a-b$ or $b-a$. In the first case, we add these numbers, and in the second, we subtract - the result is $10001 a$, which is divisible by 73. This means that if the remainder of the division of our number by 73 was $x$ before the operation, then after the operation, the remainder of the division of the new number is either $73-x$ or still $x$.

Now let's consider the second operation. When it is performed, $3 \cdot 10^{n}$ is added to the number, and $10^{n+1}$ and $3 \cdot 10^{n-1}$ are subtracted from it. In total, $73 \cdot 10^{n-1}$ is subtracted from the number, so the remainder of the division by 73 is preserved.

The initial number had a remainder of 7 when divided by 73 (since $55555555=5555 \cdot 10001$ is divisible by 73, which means that a number consisting of a hundred fives and four zeros at the end is divisible by 73, and the remainder is influenced only by the last four digits. The remainder of the division of the number 5555 by 73 is 7. Therefore, the final number can give remainders of 7 or 66 when divided by 73, and among two-digit numbers, these are only 66 and 80.

Now let's prove that both numbers can be obtained.

By applying the first operation to the number consisting of fives twice, we simply reduce the number of fives by 8. After multiple applications of this operation, we will get a number consisting of twelve fives. From this number, we can get 554825554825 with two more operations, then 554825547525. By performing two more operations in different places, we get 554824817452, from which we get 554824816722.

Now we apply the first operation and get 55475759. From this, the second operation gives 55475686, from which the first operation gives the number 139. From this, the second operation gives 66.

To get 80, we again get the number consisting of twelve fives. From this, we get 555555554825, then 555555554752, and then 555555547452. From this number, we get 555555546722, from which two operations in different places of the number give 555548239422. Applying the first operation, we get 55545401, and then 153. Applying the second operation to it again, we get the number 80.