You are viewing a single comment's thread. Return to all comments →
why my code isnt passing more than 1 case import sys t = int(input().strip()) for a0 in range(t): n = int(input().strip())
l = [] for i in range(2, n): if n%i==0: l.append(i) if l: print(l[-1]) else: print(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 →
why my code isnt passing more than 1 case import sys t = int(input().strip()) for a0 in range(t): n = int(input().strip())