We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Project Euler #3: Largest prime factor
Project Euler #3: Largest prime factor
Sort by
recency
|
482 Discussions
|
Please Login in order to post a comment
public class Solution { private static Map primeMap = new HashMap<>(); public static void main(String[] args) { Scanner in = new Scanner(System.in); int t = in.nextInt(); for(int a0 = 0; a0 < t; a0++){ long n = in.nextLong(); for(long i=n;i>2;i--){ if(n%i!=0) continue;
}
Java: I dont know how to make it faster...
This was a bit complex. but passed all tests
Haskell