4. Given a right-angled triangle with side lengths as positive integers, its perimeter is 80. Then the lengths of the three sides are $\qquad$ .
4. $30,16,34$.

Let the three sides of a right triangle be $a, b, c$. From the problem, we have $a^{2}+b^{2}=c^{2}$ and $a+b+c=80$.
Substituting $c=80-a-b$ into $a^{2}+b^{2}=c^{2}$, we get
$$
6400-80 a-80 b+a b=3200,
$$

which simplifies to $(80-a)(80-b)=3200$.
Since $0<a, b<80$, we have $(80-a)(80-b) = 50 \times 64$.
From $80-a=50, 80-b=64$, we get $a=30, b=16$.
Thus, $c=34$.