package com.ejpm.euler.problem.impl;

import com.ejpm.euler.problem.Problem;
 
	/**
	 * The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
	 * Find the sum of all the primes below two million.
	 */
public class Problem10 implements Problem {
    
 
    
    private final static boolean EXEC = false;

    @Override
    public void execute() {
        if(!EXEC){
           System.out.println("Problem 10 skipped. Needs performance mprov");
           return;
        }
		long soma = 0;
		
		for(long count = 1; count < 2000000l;count ++){
			if(ePrimo(count))
				soma += count;
		}
		
		System.out.println("Problem10 Resultado: "+soma);
    }

	 
	public static boolean ePrimo(long num){
		int contador = 0;
		long divisor = num;
		
		do{
			if(num % divisor == 0)
				contador ++;
			
			divisor --;
		}while(divisor > 0);
		
		return contador == 2;
	}
  	}  
@@ -31,16 +31,57 @@
 .impl;%0A%0A
+import com.ejpm.euler.math.SequencesSum;%0A
 import c
@@ -115,16 +115,13 @@
 em;%0A
- %0A%09
+%0A
 /**%0A
-%09
  * T
@@ -172,20 +172,16 @@
  7 = 17.
-%0A%09 *
  Find th
@@ -192,24 +192,27 @@
 m of all the
+%0A *
  primes belo
@@ -226,17 +226,16 @@
 illion.%0A
-%09
  */%0Apubl
@@ -277,67 +277,8 @@
 em %7B
-%0A    %0A %0A    %0A    private final static boolean EXEC = false;
 %0A%0A  
@@ -321,30 +321,8 @@
 ) %7B%0A
-        if(!EXEC)%7B%0A   
     
@@ -359,462 +359,114 @@
 m 10
- skipped. Needs performanc
+:%5Ct The sum of all th
 e 
-m
 pr
-ov%22);%0A           return;%0A        %7D%0A%09%09long soma = 0;%0A%09%09%0A%09%09for(long count = 1; count %3C 2000000l;count ++)%7B%0A%09%09%09if(ePrimo(count))%0A%09%09%09%09soma += count;%0A%09%09%7D%0A%09%09%0A%09%09System.out.println(%22Problem10 Resultado: %22+soma);%0A    %7D%0A%0A%09 %0A%09public static boolean ePrimo(long num)%7B%0A%09%09int contador = 0;%0A%09%09long divisor = num;%0A%09%09%0A%09%09do%7B%0A%09%09%09if(num %25 divisor == 0)%0A%09%09%09%09contador ++;%0A%09%09%09%0A%09%09%09divisor --;%0A%09%09%7Dwhile(divisor %3E 0);%0A%09%09%0A%09%09return contador == 2;%0A%09%7D%0A  %09%7D  
+imes bellow 2 Million is %22 + SequencesSum.sumAllPrimeNumbersUnder(2000000));%0A    %7D%0A%7D%0A

Refactor problem 10