10-5. For each natural number from 1 to 999, Damir subtracted the last digit from the first digit and wrote all 1000 differences on the board. For example, for the number 7, Damir wrote the number 0 on the board, for the number 105 he wrote $(-4)$, and for the number 61 he wrote 5.

What is the sum of all the numbers on the board
Answer: 495.

Solution: Note that for single-digit numbers, zeros are recorded on the board, which do not affect the sum. For numbers where the first and last digit are the same, zeros are also recorded on the board, which do not affect the sum.

Almost all other numbers can be paired: a number and the number obtained by swapping the first and last digit. For example, 17 and 71, 122 and 221, 103 and 301. If for one number in the pair, the number $x$ is recorded on the board, then for the other number in the pair, $-x$ is recorded, resulting in a zero contribution to the sum of all numbers on the board from $x$ and $-x$.

It remains to consider the numbers that do not have a pair. These are numbers ending in 0! For these, everything needs to be calculated directly. Numbers of the form $a 0$ (where $a=1,2, \ldots 9$) will contribute $a$ to the calculated sum, and there is one such number for each $a$. Numbers of the form $a * 0$ will also contribute $a$ to the calculated sum, and there are 10 such numbers. In total, there are 11 addends, each equal to $a$, in the calculated sum.

Therefore, the calculated sum is

$$
1 \cdot 11+2 \cdot 11+3 \cdot 11+\ldots+9 \cdot 11=45 \cdot 11=495
$$