(4) 28077 Hint: First calculate
$$
S=S(0)+S(1)+S(2)+\cdots+S(1999),
$$

then $2 S=(1+9+9+9) \times 2000$, so $S=28$ 000. Because
$$
\begin{aligned}
& S(2000)+(2001)+\cdots+(2012) \\
= & 2 \times 13+(1+2+\cdots+9)+[1+(1+1)+(1+2)] \\
= & 26+45+5=77 .
\end{aligned}
$$

The sum of the digits sought is 28077.
(4) Let $S(n)$ denote the sum of the digits of the non-negative integer $n$, for example, $S(1997)=1+9+9+7=26$, then $S(1)+S(2)+\cdots+S(2012)=$ $\qquad$ .