10. For any positive integer $x$, let $S(x)$ be the sum of all its digits in decimal notation. Find all solutions to the equation $x=(S(x)+9)^{2}$.
10. $100,324,361,729,784$.

Let $n$ be the number of digits of $x$. Then
$$
\begin{array}{l}
S(x) \leqslant 9 n, \\
10^{n-1} \leqslant x=(S(x)+9)^{2} \leqslant(9 n+9)^{2} \\
\Rightarrow 10^{n-1} \leqslant 81(n+1)^{2} .
\end{array}
$$

The above inequality holds only when $n \leqslant 3$.
Since $x=(S(x)+9)^{2} \geqslant(1+9)^{2}=100$, $x$ must have at least three digits, i.e., $n \geqslant 3$.
Thus, $n=3$, and in this case,
$$
(S(x)+9)^{2}=x<1000 \Rightarrow S(x) \leqslant 22 \text{. }
$$

Since $x \equiv S(x) \pmod{9}$, we have
$$
\begin{array}{l}
S(x) \equiv (S(x))^{2} \pmod{9} \\
\Rightarrow S(x) \equiv 0,1 \pmod{9} \\
\Rightarrow S(x)=1,9,10,18,19 .
\end{array}
$$

Calculating, we get $x=100,324,361,729,784$, all of which satisfy the equation.