Package net.n1da.dev.euler
Class PE0058
- java.lang.Object
-
- net.n1da.dev.euler.core.Problem
-
- net.n1da.dev.euler.PE0058
-
- All Implemented Interfaces:
Solvable
public class PE0058 extends Problem
Solution for problem 58 "Spiral primes" completed on Sat, 10 Dec 2016, 07:47.- Since:
- 30.10.2016 20:30:40
- Author:
- Nico Danneberg
- See Also:
- Problem @ Project Euler, Solution @ Ni-Da-Net
-
-
Method Detail
-
solve
public java.lang.String solve()
It is only one loop needed that steps over all elements of the spiral. Every element is checked to be a prime. The loop run while the number of found primes is more than ten times the number of all elements of the spiral.- Returns:
- the side length of the spiral when the number of primes falls below one of ten of all elements
- See Also:
Mathe.isPrime(int)
-
-