You are viewing a single comment's thread. Return to all comments →
long factor = 2; while(factor*factor<=n){ if(n%factor==0){ n /= factor; }else{ factor++; } } System.out.println(n); }
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #3: Largest prime factor
You are viewing a single comment's thread. Return to all comments →