3. The sides of a right-angled triangle are all integers, and the numerical value of its area is equal to the numerical value of its perimeter. Try to determine the lengths of the three sides of this right-angled triangle.
$(2003$, Beijing Junior High School Mathematics Competition)
Let the two legs of a right triangle be $a$ and $b$ $(a \geqslant b)$, and the hypotenuse be $c$. Then
$$
\left\{\begin{array}{l}
a^{2}+b^{2}=c^{2}, \\
\frac{1}{2} a b=a+b+c .
\end{array}\right.
$$

Eliminating $c$ from the two equations, we get
$$
\begin{array}{l}
a b-4 a-4 b+8=0 \\
\Rightarrow(a-4)(b-4)=8 \\
\Rightarrow(a, b)=(12,5),(8,6) .
\end{array}
$$

Thus, there are two different triangles, with side lengths 5, 12, 13 or $6, 8, 10$.