Pythagorean Triples

From Codeforces. Pythagorean triple generation. Solve the geometry problem "Pythagorean Triples".

Examples
Input: [1,2,3]
Output: 0
Hints

Pythagorean Triples

**From Codeforces.** Pythagorean triple generation. Solve the geometry problem "Pythagorean Triples".