1. Given the equation $\left|x^{2}-2 a x+b\right|=8$ has exactly three real roots, and they are the side lengths of a right triangle. Find the value of $a+b$.
(Bulgaria)
II. 1. Note that, for the equation
$$
x^{2}-2 a x+b-8=0
$$

the discriminant $\Delta_{1}=4\left(a^{2}-b+8\right)$; for the equation
$$
x^{2}-2 a x+b+8=0
$$

the discriminant $\Delta_{2}=4\left(a^{2}-b-8\right)$.
According to the problem, the original equation has exactly three real roots, so one of the discriminants is 0, and the other is greater than 0.
Since $\Delta_{1}>\Delta_{2}$, then $a^{2}-b-8=0$.
Thus, the repeated root of equation (2) is $a$, and the two roots of equation (1) are $a+4$ and $a-4$.
Therefore, $a^{2}+(a-4)^{2}=(a+4)^{2}$
$$
\begin{array}{l}
\Rightarrow a=16 \Rightarrow b=a^{2}-8=248 \\
\Rightarrow a+b=264 .
\end{array}
$$