10.5 If the digits $M$, $X$, and $Y$ are distinct, and the equation $\frac{\overline{M X \cdots X Y}}{\overline{M Y}}=$ $X M \cdots M Y$
$-\frac{n \uparrow}{\overline{X Y}}$ holds for any $n \geqslant 1$ (where $n$ is the number of $X$'s in $\overline{M X \cdots X Y}$, and the number of $M$'s in $\overline{X M \cdots M Y}$), find $M$, $X$, and $Y$.
(Kyiv Mathematical Olympiad, 1977)
[Solution] Let $A=10^{n+1}, B=\underset{n \uparrow 1}{11 \cdots 10}$, then the given equation can be rewritten as
$$
(M A+X B+Y)(10 X+Y)=(X A+M B+Y)(10 M+Y)
$$

After rearrangement, we get
$$
A Y(M-X)=B(10 X+10 M+Y)(M-X)+10 Y(M-X) \text {. }
$$

Since $M \neq X$, we can divide both sides of the above equation by $M-X$, yielding
$$
\begin{array}{l}
A Y=B(10 X+10 M+Y)+10 Y, \\
Y(A-B-10)=10 B(X+M) .
\end{array}
$$

Given that $A=9 B+10$, the above equation can be further simplified to

that is,
$$
\begin{array}{c}
8 B Y=10 B(X+M), \\
4 Y=5(X+M) .
\end{array}
$$

From this, we can see that $Y$ is divisible by 5, and clearly $Y \neq 0$.
Thus,
$$
\begin{array}{l}
Y=5 . \\
X+M=4 .
\end{array}
$$

Furthermore,
$$
X \neq M \text {, }
$$

Therefore,
$$
X=3, \quad M=1 \text {, }
$$

or
$$
X=1, \quad M=3 \text {, }
$$

or
or
$$
X=0, \quad M=4 \text {, }
$$
$$
X=4, \quad M=0 \text {. }
$$

Hence, the given equation is
or
$$
\begin{array}{l}
\frac{311 \cdots 15}{35}=\frac{133 \cdots 35}{15}, \\
\frac{400 \cdots 05}{45}=\frac{44 \cdots 45}{5} .
\end{array}
$$