## Task 34/74

Choose a natural number $n$ with at least two digits, whose decimal representation contains no zero. By arbitrarily swapping the digits in it, a second natural number $n^{\prime}$ is obtained.

If one digit is erased from the difference $n-n^{\prime}$, the erased digit can be determined from the sum of the remaining digits. How is this possible?
Let $n \equiv k(\bmod 9)$ with $k \in G, 0 \leq k \leq 8$. Then $n^{\prime} \equiv k(\bmod 9)$ as well. This follows directly from the fact that the digit sum does not change when the digits are swapped; thus, $Q(n)=Q\left(n^{\prime}\right)$, where $Q(n)$ denotes the digit sum of the number $n$. It is well known, however, that $Q(n) \equiv n(\bmod 9)$. This immediately yields $n-n^{\prime} \equiv 0(\bmod 9)$, hence

$$
Q\left(n-n^{\prime}\right)=9 m
$$

with $m \in G$. If $z$ is the erased digit and $S$ is the sum of the remaining digits, then

$$
S+z=Q\left(n-n^{\prime}\right)=9 m \quad ; \quad z=9 m-S
$$

Thus, the erased digit can be determined by subtracting the sum $S$ from the next higher number divisible by 9 (the next higher one because $0<z \leq 9$ holds).