In the following addition example, the same letters represent the same digits, different letters represent different digits:

$$
\begin{array}{r}
R A T A M \\
R A D \\
\hline U L O H Y
\end{array}
$$

Replace the letters with digits so that the example is correct. Find two different substitutions.

(E. Novotná)

Hint. Start with the digits hidden behind the letters $A$ and $L$.
First, let's note that in the example, ten different letters appear, so all digits will be used in the substitution.

Next, we see that we are adding a five-digit number to a three-digit number, and the digit in the thousands place changes. This can only happen if there is a carry from the hundreds column (a "carry over the ten"). Given that the relevant sum is always less than 20, $A$ must be 9, $L$ must be 0, and $U = R + 1$.

Now, both addends in the tens place are 9, so $H$ could be 8 or 9, depending on whether there is a carry from the last column. Since $H$ and $A$ must be different, $H$ must be 8, and there is no carry from the last column. Therefore, for the digits in this column, $Y = M + D$.

In the hundreds column, a carry from the tens column contributes, and it also contributes to the thousands column. Therefore, for the digits in this column, $10 + O = T + R + 1$. For clarity, let's summarize the current findings:

$$
\begin{aligned}
& R 9 T 9 M \\
& R 9 D \\
& \overline{U O O 8 Y}, \quad \text{where} \quad U = R + 1, \quad O = T + R - 9, \quad Y = M + D \text{.}
\end{aligned}
$$

The unknown letters need to be replaced with digits from 1 to 7 so that all the given relationships hold. Now, some trial and error is unavoidable, which can be quite time-consuming. Given that the letter $R$ is repeated, it is advisable to start testing from there. It turns out that for all valid solutions, $R = 6$, and thus $U = 7$. The remaining digits from 1 to 5 can be substituted as follows:

![](https://cdn.mathpix.com/cropped/2024_04_17_e836f4ee23919875e85ag-5.jpg?height=164&width=1010&top_left_y=446&top_left_x=523)

To satisfactorily solve the problem, it is sufficient to find two of the given substitutions. Swapping $M$ and $D$ is an obvious way to derive one solution from another.

Note. Before actual testing, one can notice that for $O \geq 1$ to hold, $T + R \geq 10$ must be true. Given that neither of these digits can be greater than 7, both $T$ and $R$ must be at least 3. From the given relationships, it also follows that $Y$ must be at least 3 and $U$ at least 4. Therefore, the digits 1 and 2 must be two of the letters from the set $M, D$, and $O$.