You are viewing a single comment's thread. Return to all comments →
Here my code
class Result { public static boolean isPrime(int p){ for(int i = 2 ; i<=p/i ; i++){ if(p%i==0) return false; } return true; } public static int primeCount(long n) { long acum = 1; int count = 0; for(int i = 2 ; acum<=n/i ; i++){ if(isPrime(i)){ acum*=i; count++; } } return count; } }
Seems like cookies are disabled on this browser, please enable them to open this website
Leonardo's Prime Factors
You are viewing a single comment's thread. Return to all comments →
Here my code