1082. How many terms of the sum

$$
1+2+3+\ldots+n
$$

are needed to get a three-digit number that is written with identical digits?
$\triangle$ Let's denote this three-digit number as $\overline{a a a}$. Applying the formula for the sum of $n$ terms of an arithmetic progression, we get:

$$
\frac{n(n+1)}{2}=\overline{a a a}=a \cdot 111, \quad n(n+1)=2 \cdot a \cdot 111=2 \cdot 3 \cdot 37 \cdot a
$$

From this, either $n$ or $n+1$ is divisible by 37, and more precisely, it equals 37, because if, for example, $n+1$ is at least $2 \cdot 37=74$, then $n=3 a \leqslant 27$, which is impossible.

Let $n+1=37$, i.e., $n=36$. Then

$$
36 \cdot 37=2 \cdot 3 \cdot 37 \cdot a, \quad 36=6 a, \quad a=6
$$

Let $n=37$. We get:

$$
37 \cdot 38=2 \cdot 3 \cdot 37 \cdot a, \quad 3 a=19
$$

But the last equation is impossible.

Answer: 36.