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$.
[Solution] Since $a^{2}+b^{2}=q(a+b)+r$, where $0 \leqslant r < q$, and if $q > 44$, then $r \geq q > 44$, which contradicts $0 \leqslant r < q$, 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 \leqslant \frac{2}{3}(a+b)$),
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$ when $a > \frac{2}{3}(a+b)$.
Therefore, $43 < \frac{a^{2}+b^{2}}{a+b} \leqslant 44$.
But since $q \leqslant 44$, hence $q=44$ and $r=41$, so we have
$$
a^{2}+b^{2}=44(a+b)+41,
$$

which simplifies to $(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}=37, \\ b_{3}=50 ;\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)
$$