added old solutions
This commit is contained in:
parent
3a4827b082
commit
a373abfdf1
14 changed files with 153 additions and 0 deletions
11
py/3.py
Normal file
11
py/3.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
from sympy.ntheory import isprime
|
||||
import math
|
||||
|
||||
def primefactor(x):
|
||||
res = 0
|
||||
for i in range(2,math.ceil(math.sqrt(x))):
|
||||
if(not isprime(i) or x%i != 0): continue
|
||||
res = i
|
||||
return res
|
||||
|
||||
print(primefactor(600851475143))
|
||||
Loading…
Add table
Add a link
Reference in a new issue