Package net.n1da.dev.euler
Class PE0022
- java.lang.Object
-
- net.n1da.dev.euler.core.Problem
-
- net.n1da.dev.euler.PE0022
-
- All Implemented Interfaces:
Solvable
public class PE0022 extends Problem
Solution for problem 22 "Names scores" completed on Mon, 25 May 2015, 06:49.- Since:
- 24.05.2015 06:53:27
- Author:
- Nico Danneberg
- See Also:
- Problem @ Project Euler, Solution @ Ni-Da-Net
-
-
Method Summary
Modifier and Type Method Description void
prepare()
Reads the names from a file into thelocal array
.java.lang.String
solve()
This method solves the given problem bycalculating the alphabetical value
for every name in thelocal memory
.-
Methods inherited from class net.n1da.dev.euler.core.Problem
finish, getResult, getRuntime, toString
-
-
-
-
Method Detail
-
prepare
public void prepare()
Reads the names from a file into thelocal array
.- Specified by:
prepare
in interfaceSolvable
- Overrides:
prepare
in classProblem
- See Also:
IO.readSortedStrings(String)
-
solve
public java.lang.String solve()
This method solves the given problem bycalculating the alphabetical value
for every name in thelocal memory
.- Returns:
- the sum of all name scores
- See Also:
Mathe.getAlphabeticalValue(String)
-
-