Let's write down the natural numbers from 1 to 1002003. What is the sum of the digits written?
I. solution. Let's determine the sum after writing the number 999999. We can think that the numbers were written by a numbering machine, which even writes single-digit numbers as six-digit numbers with leading zeros that do not change the sum, and for the same reason, the machine also wrote the number 000000.

Thus, the number of written numbers is $10^{6}$, the number of digits is $6 \cdot 10^{6}$, and the machine struck each of the 10 different digits the same number of times in each of the 6 different place values (in the hundred-thousands, ten-thousands, ..., units place), i.e., $10^{5}$ times, so the sum so far is $6 \cdot 10^{5}(0+1+$ $+2+\ldots+8+9)=27 \cdot 10^{6}$.

Proceeding to the writing of 1001999, we write $2 \cdot 10^{3}$ 1's in the millions place and $10^{3}$ 1's in the thousands place, and we write the numbers from 000 to 999 twice (the other written digits are 0). The sum of the digits of the latter, by similar reasoning as above,

$$
2 \cdot 3 \cdot 10^{2}(0+1+\ldots+9)=27 \cdot 10^{3}
$$

here, the sum of the digits is $3 \cdot 10^{4}$.

Finally, in the remaining 4 numbers, the sum is $3+4+5+6=18$, so the sought sum is 27030018.

Judit Katona (Budapest, Kaffka M. gimn. I. o. t.) Péter Ágoston (Budapest, Berzsenyi D. gimn. I. o. t.)

Remark. The sum of the digits in the complete millions and thousands series can also be obtained by pairing the numbers from the front and back. For example, for the six-digit numbers:

$$
000000 \text { and } 999 \text { 999, } 000001 \text { and } 999 \text { 998, ..., } 499999 \text { and } 500000 .
$$

In this case, the sum of the digits in each place value is 9, so the sum of the digits in each pair is $6 \cdot 9=54$. On the other hand, there are half a million pairs, so the sum of the 6 million digits written is 27 million.

II. solution. We determine the sum of the digits by place value, again writing 0 at the beginning of the numbers. The 1002004 number written consists of 100200 complete 10-number sequences, in which $0,1,2, \ldots, 9$ stand one after the other, so the sum in each place value is:

$$
100200(0+1+\ldots+9)+(0+1+2+3)=4509006
$$

Similarly, in the tens and hundreds place values, the same digit stands 10 by 10, and 100 by 100, but up to 1001999, each digit appears the same number of times, so the sum, after the number of sequences is 10020:

$$
\begin{array}{r}
10020 \cdot 10(0+1+\ldots+9)+4 \cdot 0=4509000, \\
1002 \cdot 100(0+1+\ldots+9)+4 \cdot 0=4509000
\end{array}
$$

In the thousands and millions place values, the 1's digit appears more often than the others, and the 0 also appears in the $10^{4}$ and $10^{5}$ place values, respectively:

$$
\begin{array}{rlr}
100 \cdot 1000(0+1+\ldots+9)+1000(0+1)+4 \cdot 2 & =4501008 \\
10 \cdot 10000(0+1+\ldots+9)+2004 \cdot 0 & & =4500000 \\
100000(0+1+\ldots+9)+2004 \cdot 0 & & =4500000 \\
2004 \cdot 1 & & =2004
\end{array}
$$

Thus, the sum of the column sums is 27030018.