project-euler

Integer right triangles

Problem Description

If p is the perimeter of a right angle triangle with integral length sides, {a,b,c}, there are exactly three solutions for p = 120.

{20,48,52}, {24,45,51}, {30,40,50}

For which value of p ≤ 1000, is the number of solutions maximised?

Performance

Try it online!

Real time: 21.257 s
User time: 21.056 s
Sys. time: 0.119 s
CPU share: 99.61 %
Exit code: 0