## Task A-1.3.

Each digit of the natural number $n$ (except the first) is strictly greater than the digit immediately to its left. Determine the sum of all digits of the number $9 n$.
## First solution.

Let $n=\overline{a_{m-1} a_{m-2} \ldots a_{1} a_{0}}$. It holds that $a_{0}>a_{1}>\ldots>a_{m-1}$. Now we have

$$
\begin{aligned}
9 n & =(10-1)\left(10^{m-1} a_{m-1}+10^{m-2} a_{m-2}+\ldots+10 a_{1}+a_{0}\right) \\
& =(10-1) 10^{m-1} a_{m-1}+(10-1) 10^{m-2} a_{m-2}+\ldots+(10-1) 10 a_{1}+(10-1) a_{0} \\
& =10^{m} a_{m-1}+10^{m-1} a_{m-2}+\ldots+10^{2} a_{1}+10 a_{0}-10^{m-1} a_{m-1}-10^{m-2} a_{m-2}-\ldots-10 a_{1}-a_{0} \\
& =10^{m} a_{m-1}+10^{m-1}\left(a_{m-2}-a_{m-1}\right)+\ldots+10^{2}\left(a_{1}-a_{2}\right)+10\left(a_{0}-a_{1}\right)-a_{0} \\
& =10^{m} a_{m-1}+10^{m-1}\left(a_{m-2}-a_{m-1}\right)+\ldots+10^{2}\left(a_{1}-a_{2}\right)+10\left(a_{0}-a_{1}-1\right)+\left(10-a_{0}\right)
\end{aligned}
$$

Since $0 \leqslant a_{m-1},\left(a_{m-2}-a_{m-1}\right), \ldots,\left(a_{1}-a_{2}\right),\left(a_{0}-a_{1}-1\right),\left(10-a_{0}\right) \leqslant 9$, these numbers are the digits of the number $9 n$, and their sum is $a_{m-1}+\left(a_{m-2}-a_{m-1}\right)+\ldots+\left(a_{1}-a_{2}\right)+$ $\left(a_{0}-a_{1}-1\right)+\left(10-a_{0}\right)=9$.