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
|
473 Discussions
|
Please Login in order to post a comment
Below is my code but one hidden test case is still failing, can someone help here?
import java.util.*;
public class Solution {
}
i passed 3 test cases but failed to pass last 2 test case.Can anybody help me out?
handle,"%d",a0 = 0; t; handle,"%ld",prime=array(); for(i<=i++){ if(i==0){ array_push(i); } } prime as parr)); echo "\n"; }
?>****
below code in python passed 1st sample test case but failed hidden test case, could anyone help:
mport sys def factor(n): l=[] for i in range(2,n+1): if n%i==0: l.append(i) for j in l: for k in range(2, j): if (j % k) != 0: continue else: l.remove(j) break #print(j,k) #print(l) l.sort(reverse=True) return(l[0])
t = int(input().strip()) for a0 in range(t): n = int(input().strip()) print(factor(n))
why my code isnt passing more than 1 case import sys t = int(input().strip()) for a0 in range(t): n = int(input().strip())