Problem 6. The notorious criminal Professor Moriarty had long been hiding from Sherlock Holmes and the London police. And one day, the police managed to intercept a telegram that Moriarty sent to an accomplice:

## Meet tomorrow train STO car O

Inspector Lestrade had already ordered a police unit to look for the zeroth car of the hundredth train, but then two more intercepted telegrams to the same address were brought in:

$$
\text { SECRET - OPEN = ANSWER - YOUR }
$$

$$
\text { SEКRET - OPEN = } 20010
$$

Lestrade was puzzled. But Holmes exclaimed: “Now it's clear which train to meet!” The inspector was surprised.

“Elementary, Lestrade!” the detective explained. - This is a cipher. In these equations, the same letters represent the same digits, different letters represent different digits, and the dash is a minus sign! Moriarty is traveling on train number ...”

Write the number of the train and the car. Explain how Holmes could have reasoned.
Answer. Train No. 392, Carriage No. 2.

Solution. Let's look at the longest telegram. We can see that in the right and left parts of the equation, the last two digits are the same: ET-OY. This means that in the higher digits, the right and left sides will also be the same:

$$
\text { SEKR - OTKR = OTV - TV. }
$$

Now, if we perform the subtractions, the same two letters will cancel out on both sides, meaning there will be two zeros at the ends. When we divide by 100, we get:

$$
\mathrm{CE}-\mathrm{OT}=\mathrm{O}
$$

Now let's look at the last telegram. If we write it as an addition problem in a column,

$$
\begin{aligned}
& \text { + O T K R T T } \\
& 2001010 \\
& \text { SE K R E T }
\end{aligned}
$$

we can see that OТ + 2 = CE. Comparing this with the previous equation, we understand that $\mathrm{O}=2$, and then $\mathrm{C}=3$. Additionally, a carry-over occurred from the units place to the tens place, so $T=8$ or $T=9$. However, if we assume that $\mathrm{T}=8$, then $\mathrm{E}=0$, and then the addition $\mathrm{Y}+1=\mathrm{E}$ (i.e., $\mathrm{G}+1=0$) would inevitably result in a carry-over to the next place. But this did not happen, so $\mathrm{T}=9$. We have now determined the values of all the necessary letters.

Comment. From the solution, it also follows that $\mathrm{E}=1$ and $\mathrm{Y}=$ $=0$. The letters K, R, B, Y can represent any four of the five remaining digits: $4,5,6,7,8$, but the train and carriage numbers are not related to them.

## 7th Grade