Ctibor and Míla were solving the same problem from a collection. Three edge lengths of a quadrilateral prism were given in millimeters, and the task was to calculate its volume and surface area. Ctibor first converted the given lengths to centimeters. It was easier for him to calculate this way because even after conversion, all lengths were expressed as whole numbers. Both got the correct results, Míla in $\mathrm{mm}^{3}$ and $\mathrm{mm}^{2}$, and Ctibor in cm and $\mathrm{cm}^{2}$. Míla's result in $\mathrm{mm}^{3}$ was 17982 greater than Ctibor's result in cm ${ }^{3}$. Míla's result in $\mathrm{mm}^{2}$ was 5742 greater than Ctibor's result in $\mathrm{cm}^{2}$. Determine the lengths of the edges of the prism.

(L. Šimünek)
Let the lengths in cm be denoted by $a, b, c$. The same lengths in $\mathrm{mm}$ are then $10 a, 10 b$, $10 c$. We express the volumes and surface areas calculated by Ctibor and Míla:

$$
\begin{aligned}
V_{C} & =a b c \\
V_{M} & =10 a \cdot 10 b \cdot 10 c=1000 a b c, \\
S_{C} & =2(a b+b c+c a), \\
S_{M} & =2(10 a \cdot 10 b+10 b \cdot 10 c+10 c \cdot 10 a)=200(a b+b c+c a) .
\end{aligned}
$$

According to the given differences, we set up the equations

$$
\begin{aligned}
& V_{M}-V_{C}=999 a b c=17982, \\
& S_{M}-S_{C}=198(a b+b c+c a)=5742,
\end{aligned}
$$

which we simplify:

$$
\begin{aligned}
a b c & =18, \\
a b+b c+c a & =29 .
\end{aligned}
$$

We find all valid solutions to the first equation, i.e., all possible factorizations of the number 18 into the product of three natural numbers. For each of these possibilities, we check whether the second equation also holds (considering only $a \leqq b \leqq c$):

| $a$ | $b$ | $c$ | $a b+b c+c a$ |
| :---: | :---: | :---: | :---: |
| 1 | 1 | 18 | $1+18+18=37$ |
| 1 | 2 | 9 | $2+18+9=\mathbf{2 9}$ |
| 1 | 3 | 6 | $3+18+6=27$ |
| 2 | 3 | 3 | $6+9+6=21$ |

The table shows the only solution satisfying both equations, so the edges of the given prism have these lengths: $10 \mathrm{~mm}, 20 \mathrm{~mm}$, and $90 \mathrm{~mm}$.

Another solution. The natural number representing the volume of the prism in $\mathrm{cm}^{3}$ is a thousand times smaller than the number representing the same in $\mathrm{mm}^{3}$. Similarly, the number representing the surface area in $\mathrm{cm}^{2}$ is a hundred times smaller than the number representing the same in $\mathrm{mm}^{2}$. The problem statement written using algebrograms looks as follows:

![](https://cdn.mathpix.com/cropped/2024_04_17_1e8c778e46dcaf241e4bg-3.jpg?height=169&width=531&top_left_y=2457&top_left_x=768)

When solving, we proceed from the right and see that each letter can be replaced by a digit in only one possible way. (When constructing the algebrogram, it was clear that the minuend should have the same number of digits as the difference, and this is because the subtrahend is several orders of magnitude smaller than the minuend and the given difference does not start with the digit 9.)

Algebrograms have a unique solution: $J=1, K=8$, i.e., $V_{C}=18\left(\mathrm{~cm}^{3}\right)$, and $X=5, Y=8$, i.e., $S_{C}=58\left(\mathrm{~cm}^{2}\right)$. We continue with the table in the same way as in the previous method.

Evaluation. 1 point for $V_{C}=18$; 1 point for $S_{C}=58$, or for $a b+b c+c a=29$; 1 point for justifying the method of finding the volume and surface area; 2 points for all possible factorizations of the number $18$; 1 point for determining the correct factorization.