1.41 Let $a, b$ be positive integers. When $a^{2}+b^{2}$ is divided by $a+b$, the quotient is $q$ and the remainder is $r$. Find all pairs $(a, b)$ such that $q^{2}+r=1977$.

---

The translation maintains the original format and line breaks as requested.
[Solution] Since $a^{2}+b^{2}=q(a+b)+r$, where $0 \leqslant r < q$, and if $r > 0$ it leads to a contradiction, so $q \leqslant 44$, and $\frac{a^{2}+b^{2}}{a+b} > 128$. Without loss of generality, assume $a \geqslant b$, then $a \geqslant \frac{1}{2}(a+b)$.

When $a \leqslant \frac{2}{3}(a+b)$, $b \geqslant \frac{1}{3}(a+b)$,
$$\frac{a^{2}+b^{2}}{a+b} \geqslant \frac{\left[\frac{1}{2}(a+b)\right]^{2}+\left[\frac{1}{3}(a+b)\right]^{2}}{a+b}=\frac{13}{36}(a+b).$$

Since $(a+b) > 128$,
so $\frac{a^{2}+b^{2}}{a+b} > 46$, (this contradicts $\frac{a^{2}+b^{2}}{a+b} < 46$).

When $a > \frac{2}{3}(a+b)$,
$$\frac{a^{2}+b^{2}}{a+b} > \frac{\left[\frac{2}{3}(a+b)\right]^{2}}{a+b}=\frac{4}{9}(a+b) > 56$$

This contradicts $\frac{a^{2}+b^{2}}{a+b} < 56$.
Therefore, $46 < \frac{a^{2}+b^{2}}{a+b} < 56$.
Since $q \leqslant 44$, hence $q=44$ and $r=41$, so we have
$$a^{2}+b^{2}=44(a+b)+41$$

That is, $(a-22)^{2}+(b-22)^{2}=1009$.
Solving this, we get $\left\{\begin{array}{l}a_{1}=50, \\ b_{1}=37 ;\end{array} \quad\left\{\begin{array}{l}a_{2}=50, \\ b_{2}=7 ;\end{array}\right.\right.$
$$\left\{\begin{array} { l } 
{ a _ { 3 } = 3 7 , } \\
{ b _ { 3 } = 5 0 ; }
\end{array} \quad \left\{\begin{array}{l}
a_{4}=7 \\
b_{4}=50
\end{array}\right.\right.$$

Thus, the pairs $(a, b)$ are:
$$(50,37),(50,7),(37,50),(7,50)$$