mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-19 19:03:02 +08:00
Simplify code by dropping support for legacy Python (#1143)
* Simplify code by dropping support for legacy Python * sort() --> sorted()
This commit is contained in:
@ -5,14 +5,8 @@ of a given number N?
|
||||
|
||||
e.g. for 10, largest prime factor = 5. For 17, largest prime factor = 17.
|
||||
"""
|
||||
from __future__ import print_function, division
|
||||
import math
|
||||
|
||||
try:
|
||||
raw_input # Python 2
|
||||
except NameError:
|
||||
raw_input = input # Python 3
|
||||
|
||||
|
||||
def isprime(no):
|
||||
if no == 2:
|
||||
@ -81,4 +75,4 @@ def solution(n):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(solution(int(raw_input().strip())))
|
||||
print(solution(int(input().strip())))
|
||||
|
Reference in New Issue
Block a user