Example 8 (1997 Swiss Mathematical Olympiad) $n$ is a positive integer, $n<200$, and $n^{2}+(n+1)^{2}$ is a perfect square. Find $n$.

 untranslated text remains unchanged.
Given the problem, $n^{2}+(n+1)^{2}=k^{2}$ (where $k$ is a positive integer), then $(n, n+1, k)$ forms a Pythagorean triple and $(n, n+1)=1$, so there exist $s, t (s>t)$ satisfying:
(1) $\left\{\begin{array}{l}n=s^{2}-t^{2} \\ n+1=2 s t \\ k=s^{2}+t^{2}\end{array} \quad\right.$ or (2) $\left\{\begin{array}{l}n+1=s^{2}-t^{2}, \\ n=2 s t, \\ k=s^{2}+t^{2} .\end{array}\right.$
If (1) holds, then $s^{2}-2 s t-\left(t^{2}-1\right)=0$, solving for $s$ gives
$$
s=t+\sqrt{2 t^{2}-1} \text {, }
$$

so $2 t^{2}-1$ must be a perfect square. Since $n<200$ and $n+1=2 s t<201$, and $t<s$, it follows that $t^{2}<100$, so $t<10$. Upon inspection, only $t=1$ or 5 make $2 t^{2}-1$ a perfect square. When $t=1$, $s=2$, $n=3$, $n+1=4$, and $k=5$. When $t=5$, $s=12$, $n=119$, $n+1=120$, and $k=169$.
If (2) holds, then $s^{2}-2 s t-\left(t^{2}+1\right)=0$, solving for $s$ gives
$$
s=t+\sqrt{2 t^{2}+1} \text {, }
$$

so $2 t^{2}+1$ must be a perfect square. Since $n=2 s t<200$ and $t<s$, it follows that $t^{2}<100$, so $t<10$. Upon inspection, only $t=2$ makes $2 t^{2}+1$ a perfect square. When $t=2$, $s=5$, $n=20$, $n+1=21$, and $k=29$.
In summary, the values of $n$ that satisfy the problem are $3, 20, 119$.