public class PE0010 extends Problem
Modifier and Type | Field and Description |
---|---|
private int |
max
The maximum number to search to.
|
private Sieve |
sieve
The storage for the "Sieve of Eratosthenes".
|
private long |
sum
The sum of found primes.
|
Constructor and Description |
---|
PE0010()
|
Modifier and Type | Method and Description |
---|---|
void |
prepare()
|
String |
solve()
Runs the algorithm of the "Sieve of Eratosthenes" and sums up every
found prime factor.
|
finish, getResult, getRuntime, toString
private int max
private long sum
public PE0010()
public void prepare()
prepare
in interface Solvable
prepare
in class Problem
Sieve.Sieve(int)
public String solve()
max
Sieve.next()
,
Sieve of Eratosthenes @ Wikipedia