## Task 2 - 070832

The cross sum of a natural number is understood to be the sum of its digits: for example, 1967 has the cross sum $1+9+6+7=23$.

Determine the sum of all cross sums of the natural numbers from 1 to 1000 inclusive!
We include 0 (with the digit sum 0) among the numbers to be considered, provisionally exclude 1000, and group the two numbers $a$ and $999-a$ (where $0 \leq a \leq 499$) into pairs. Let

$$
a=\alpha \cdot 10^{3}+\beta \cdot 10+\gamma
$$

with integers $\alpha, \beta, \gamma$ such that $0 \leq \alpha, \beta, \gamma \leq 9$.

Then the digit sum of $a$ is $\alpha+\beta+\gamma$. Furthermore,

$$
999-a=9 \cdot 10^{2}+9 \cdot 10+9-\alpha \cdot 10^{2}-\beta \cdot 10-\gamma=(9-\alpha) \cdot 10^{2}+(9-\beta) \cdot 10+(9-\gamma)
$$

and due to $\left(^{*}\right)$, it also holds that $0 \leq 9-\alpha, 9-\beta, 9-\gamma \leq 9$ and $9-\alpha, 9-\beta, 9-\gamma$ are integers.

Therefore, the digit sum of this number is $(9-\alpha)+(9-\beta)+(9-\gamma)$, and the sum of both digit sums is then

$$
(9-\alpha)+(9-\beta)+(9-\gamma)+\alpha+\beta+\gamma=27
$$

There are exactly 500 such pairs, so the sum of the digit sums of the numbers thus captured is $500 \cdot 27=13500$. To this, we still need to add the digit sum 1 of $1000$.

The desired sum is therefore 13501.