10. There are several warriors, forming a rectangular formation that is exactly eight columns wide. If 120 more people are added to or 120 people are removed from the formation, a square formation can be formed in both cases. How many warriors are there in the original rectangular formation?
10. Solution: Let the original number of soldiers be $8x$ people,

From the given, $8x+120$ and $8x-120$ are both perfect squares, then we have
$$
\left\{\begin{array}{l}
8 x+120=m^{2} \\
8 x-120=n^{3}
\end{array}\right.
$$
( $m, n$ are positive integers).
By (1) - (2) we get $m^{2}-n^{2}=240$,
which is $(m+n)(m-n)=240$.
From equations (1) and (2), we know that $m, n$ can be divided by 4, so $m+n$ and $m-n$ can be divided by 4.
$$
\begin{array}{l}
\text { Now (1) }\left\{\begin{array}{l}
m+n=60, \\
m-n=4,
\end{array}\right. \\
\text { ( } \mathbb{R} \text { ) }\left\{\begin{array}{l}
m+n=20, \\
m-n=12,
\end{array}\right.
\end{array}
$$

From (I) we get $m=32, n=28$, then
$$
8 x=32^{2}-120=904 \text {. }
$$

From (II) we get $m=16, n=4$, then
$$
8 x=16^{2}-120=136
$$