2. For positive integer $n$, let $f(n)$ denote the unit digit of $1+2+3+\cdots+n$. Find the value of $f(1)+f(2)+\cdots+f(2011)$. 

For the positive integer $n$, let $f(n)$ represent the unit digit of $1+2+3+\cdots+n$. Find the value of $f(1)+f(2)+\cdots+f(2011)$.
2. 7046
2. The sum of 20 consecutive positive integers has a unit digit equal to that of \(2(0+1+\cdots+9)\), which is 0. Hence \(f(n+20)=f(n)\) for all \(n\). By direct computation, we have
$$
\begin{aligned}
f(1)+f(2)+\cdots+f(20) & =1+3+6+0+5+1+8+6+5+5+6+8+1+5+0+6+3+1+0 \\
& =70
\end{aligned}
$$

Similarly, we have \(f(21)+f(22)+\cdots+f(40)=70\), \(f(41)+f(42)+\cdots+f(60)=70\) and so on, until \(f(1981)+f(1982)+\cdots+f(2000)=70\). Altogether, we have 100 groups of 70. Finally, since
$$
\begin{aligned}
f(2001)+f(2002)+\cdots+f(2011) & =f(1)+f(2)+\cdots+f(11) \\
& =1+3+6+0+5+1+8+6+5+5+6 \\
& =46
\end{aligned}
$$
the answer is \(70 \times 100+46=7046\).