from math import sqrt
def primenum(num):
flag = True
for i in range(4, int(sqrt(num))):
if (num%i==0):
flag = False
return flag
number, primes = 600851475143, []
for i in range(1000, int(sqrt(number))):
if number%i == 0:
if (primenum(i) == True):
primes.append(i)
print(primes)
No comments:
Post a Comment