mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-27 10:22:36 +08:00
Modernize Python 2 code to get ready for Python 3
This commit is contained in:
@ -3,6 +3,7 @@ Problem:
|
||||
The prime factors of 13195 are 5,7,13 and 29. What is the largest prime factor of a given number N?
|
||||
e.g. for 10, largest prime factor = 5. For 17, largest prime factor = 17.
|
||||
'''
|
||||
from __future__ import print_function
|
||||
n=int(input())
|
||||
prime=1
|
||||
i=2
|
||||
@ -13,4 +14,4 @@ while(i*i<=n):
|
||||
i+=1
|
||||
if(n>1):
|
||||
prime=n
|
||||
print prime
|
||||
print(prime)
|
||||
|
Reference in New Issue
Block a user