The sum of the digits of $$(9 \cdot 10 ^ m) \cdot (111 \dots 111)^2 + (2 \cdot10 ^ m) \cdot 111 \dots 111 + 111 \dots 111$$ is equal to: $$(111 \dots 111 = ns \mathrm{-times}).$$
Attempt:
It is $10^m(10^2n -1)+111 \dots 111$
So $18n+n =19n$
The sum of the digits of $$(9 \cdot 10 ^ m) \cdot (111 \dots 111)^2 + (2 \cdot10 ^ m) \cdot 111 \dots 111 + 111 \dots 111$$ is equal to: $$(111 \dots 111 = ns \mathrm{-times}).$$
Attempt:
It is $10^m(10^2n -1)+111 \dots 111$
So $18n+n =19n$
The sum of the digits should be $3n$. The trick is noticing $\underbrace{111\dots 111}_{\text{n times}}=\frac{10^n-1}{9}$.
Then, the rest is just algebraic manipulation–the expression becomes $\frac{10^n-1}{9}(10^{mn}+10^m+1)$, from which we can directly get the sum of the digits because there's no carrying (all of the digits are at most 3).