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.
You can use Unitextify for different font styles. However, the solution to problem is:
# Start with the smallest prime factorfactor=2whilefactor*factor<=n:ifn%factor==0:n//= factorelse:factor+=1returnnt=int(input("Enter number of test cases: "))for_inrange(t):n=int(input())print(largest_prime_factor(n))
Cookie support is required to access HackerRank
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 →
You can use Unitextify for different font styles. However, the solution to problem is: