Project Euler #3: Largest prime factor

  • + 2 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)