Package net.n1da.dev.euler
Class PE0042
- java.lang.Object
-
- net.n1da.dev.euler.core.Problem
-
- net.n1da.dev.euler.PE0042
-
- All Implemented Interfaces:
Solvable
public class PE0042 extends Problem
Solution for problem 42 "Coded triangle numbers" completed on Fri, 6 May 2016, 14:03.- Since:
- 05.05.2016 14:14:14
- Author:
- Nico Danneberg
- See Also:
- Problem @ Project Euler, Solution @ Ni-Da-Net
-
-
Method Summary
Modifier and Type Method Description java.lang.String
solve()
Reads all words from the file, calculates the numeric value of each of them, and finally checks if the resulting number is a Triangle Number.
-
-
-
Method Detail
-
solve
public java.lang.String solve()
Reads all words from the file, calculates the numeric value of each of them, and finally checks if the resulting number is a Triangle Number.- Returns:
- the number of all found triangle numbers
- See Also:
IO.readSortedStrings(String)
,Mathe.getAlphabeticalValue(String)
,Mathe.isTriangleNumber(int)
-
-