import java.io.*; public class Prob4{ static public int [] primes = new int [5000000]; static public int numOfPrimes; static public boolean [] isprime = new boolean [99999]; static public void generatePrimes(){ primes[0] = 2; primes[1] = 3; numOfPrimes = 0; numOfPrimes++; numOfPrimes++; for(int i=0; i<99999; i++){isprime[i] = false;} boolean prime = true; for(int i=5; i<99999; i+=2){ prime = true; for(int k=0; k number){break;} int remain = number - primes[i]; for(int k = i; k number){break;} if((remain - primes[k]) >= primes[k]){ if(isprime[remain - primes[k]]){num++;} } } } out.println(num); } in.close(); out.close(); } }