Three friends thought of three different non-zero digits, one of which was 3. From these digits, they formed all six possible three-digit numbers, which they then divided into three pairs. The difference of the first pair of numbers was a single-digit number, the difference of the second pair of numbers was a two-digit number, and the difference of the third pair of numbers was a three-digit number divisible by five.

Determine which three digits the friends could have thought of. Find all possible solutions.

(E. Novotná)
Let's denote the thought-of digits as $a, b$, and $c$, and without loss of generality, we assume that $a < b < c$. If the one-digit difference was obtained as $\overline{a c b} - \overline{a b c}$, then it must be that $c - b = 1$, i.e., $c = b + 1$. In such a case, $b = a + 4$ (the corresponding difference would be $100 + 40 - 5 = 135$). The difference of the remaining numbers $\overline{c a b}$ and $\overline{b c a}$ would then be two-digit $(\overline{c a b} - \overline{b c a} = 100 - 50 + 4 = 54)$. The only suitable triplet of digits containing 3 is $3, 7, 8$.

2) If the one-digit difference arose as $\overline{b c a} - \overline{b a c}$, then it would be that $c - a = 1$, i.e., $c = a + 1$. In such a case, there is no $b$ for which $a < b < c$ holds.
3) If the one-digit difference arose as $\overline{c b a} - \overline{c a b}$, then it would be that $b - a = 1$, i.e., $b = a + 1$ (the corresponding difference would be 9). Similar considerations as in the first case show that the three-digit difference can be obtained from the remaining numbers $\overline{b c a}, \overline{b a c}, \overline{a c b}$, and $\overline{a b c}$ only as $\overline{b c a} - \overline{a b c}$. For this difference to be divisible by five, it must be that $c = a + 5$, and thus $c = b + 4$ (the corresponding difference would be $100 + 40 - 5 = 135$). The difference of the remaining numbers $\overline{b a c}$ and $\overline{a c b}$ would then be two-digit $(\overline{b a c} - \overline{a c b} = 100 - 50 + 4 = 54)$. The only suitable triplets of digits containing 3 are $2, 3, 7$ and $3, 4, 8$.

The friends could have thought of the digits $3, 7, 8$ or $2, 3, 7$ or $3, 4, 8$.

Suggested scoring. 1 point for the possibilities of the one-digit difference; 2 points for all suitable triplets of numbers (1 point for at least one such triplet); 3 points based on the quality and completeness of the justification that no more triplets exist.