Package net.n1da.dev.euler
Class PE0045
- java.lang.Object
-
- net.n1da.dev.euler.core.Problem
-
- net.n1da.dev.euler.PE0045
-
- All Implemented Interfaces:
Solvable
public class PE0045 extends Problem
Solution for problem 45 "Triangular, pentagonal, and hexagonal" completed on Sun, 22 May 2016, 13:54.- Since:
- 22.05.2016 13:47:18
- Author:
- Nico Danneberg
- See Also:
- Problem @ Project Euler, Solution @ Ni-Da-Net
-
-
Method Summary
Modifier and Type Method Description java.lang.String
solve()
It just needs one loop starting from the given Hn = 40755 at n = 143 running as long as the next hexagonal number is found the is a triangular AND pentagonal number, two.
-
-
-
Method Detail
-
solve
public java.lang.String solve()
It just needs one loop starting from the given Hn = 40755 at n = 143 running as long as the next hexagonal number is found the is a triangular AND pentagonal number, two.- Returns:
- the first hexgonal number found
- See Also:
Mathe.isTriangleNumber(int)
,Mathe.isPentagonNumber(int)
-
-