Package net.n1da.dev.euler
Class PE0007
- java.lang.Object
-
- net.n1da.dev.euler.core.Problem
-
- net.n1da.dev.euler.PE0007
-
- All Implemented Interfaces:
Solvable
public class PE0007 extends Problem
Solution for problem 7 "10001st prime" completed on Thu, 9 Apr 2015, 23:34.- Since:
- 09.04.2015 23:25:27
- Author:
- Nico Danneberg
- See Also:
- Problem @ Project Euler, Solution @ Ni-Da-Net
-
-
Method Summary
-
Methods inherited from class net.n1da.dev.euler.core.Problem
finish, getResult, getRuntime, toString
-
-
-
-
Method Detail
-
prepare
public void prepare()
- Specified by:
prepare
in interfaceSolvable
- Overrides:
prepare
in classProblem
- See Also:
Sieve(int)
-
solve
public java.lang.String solve()
Runs the algorithm of the "Sieve of Eratosthenes" and count every found prime factor. If the 10001. is found, it is returned.- Returns:
- the 100001. prime factor
- See Also:
Sieve.next()
, Sieve of Eratosthenes @ Wikipedia
-
-