5. Find all positive integers $n$ such that the sum $1+2+3+\cdots+n$ is a three-digit number composed of the same digit.
5. $n=36$.
$1+2+\cdots+n=\frac{n(n+1)}{2}$, which means solving the equation $\frac{n(n+1)}{2} = 111,222, \cdots, 999$, or equivalently $n(n+1)=2 \times 3 \times 37 \times k, k = 1,2, \cdots, 9$. It can be seen that $n=36, k=6$ is the only integer solution.