For each positive integer $n$, let $f(n)$ represent the last digit of $1+2+\cdots+n$. For example, $f(1)=$
$$
\begin{aligned}
1, f(2)=3, f(5) & =5 \text {. Find } \\
f(1)+f(2) & +f(3)+\cdots+f(2004) .
\end{aligned}
$$
$$
\begin{array}{l}
\text { Given } f(1)=1, f(2)=3, f(3)=6, f(4)=0, \\
f(5)=5, f(6)=1, f(7)=8, f(8)=6, f(9)=5, \\
f(10)=5, f(11)=6, f(12)=8, f(13)=1, f(14)=5, \\
f(15)=0, f(16)=6, f(17)=3, f(18)=1, f(19)=0, \\
f(20)=0, f(21)=1, f(22)=3, f(23)=6, \cdots
\end{array}
$$

From the above, we can see that the period of $f(n)$ is 20, and
$$
f(1)+f(2)+\cdots+f(20)=70 \text {. }
$$

Also, $2004=20 \times 100+4$, so,
$$
\begin{array}{l}
f(1)+f(2)+\cdots+f(2004) \\
=70 \times 100+1+3+6+0=7010
\end{array}
$$