Package net.n1da.dev.euler
Class PE0039
- java.lang.Object
-
- net.n1da.dev.euler.core.Problem
-
- net.n1da.dev.euler.PE0039
-
- All Implemented Interfaces:
Solvable
public class PE0039 extends Problem
Solution for problem 39 "Integer right triangles" completed on Fri, 25 Mar 2016, 11:04.- Since:
- 25.03.2016 10:44:22
- Author:
- Nico Danneberg
- See Also:
- Problem @ Project Euler, Solution @ Ni-Da-Net
-
-
Method Summary
Modifier and Type Method Description java.lang.String
solve()
It solves the problem by testing every combination of integer sides to be aPythagorean Triplet
.
-
-
-
Method Detail
-
solve
public java.lang.String solve()
It solves the problem by testing every combination of integer sides to be aPythagorean Triplet
. If a triplet is found the number of hits is incremented for the sum of the three sides. Finally, the perimeter with the most hits is returned.- Returns:
- the perimeter that has the maximum combination of sides
- See Also:
Mathe.isPythagoreanTriplet(int, int, int)
-
-