Problems > Right Triangle > Editorial

Right Triangle — Solution & Editorial

Back to the Problem

Compute the three SQUARED side lengths; a right angle means the two smaller ones sum to the largest (Pythagoras) — and no side may be zero.

Complexity: O(1)