2. Let $n$ be a positive integer. If the sum $1+2+\cdots+n$ is exactly equal to a three-digit number, and each digit of this three-digit number is the same, then all possible values of $n$ are

保留源文本的换行和格式，翻译结果如下：

2. Let $n$ be a positive integer. If the sum $1+2+\cdots+n$ is exactly equal to a three-digit number, and each digit of this three-digit number is the same, then all possible values of $n$ are
Since $\frac{n(n+1)}{2}=111 \cdot k=37 \cdot 3 k \Rightarrow n(n+1)=37 \cdot 6 k \Rightarrow k=6, n=36$.

