Untitled

mail@pastecode.io avatar
unknown
python
a year ago
537 B
1
Indexable
Never
from math import *
from time import time
from functools import lru_cache
start = time()
@lru_cache(None)
def isProst(n):
    for i in range(2, int(n ** 0.5) + 1):
        if n % i == 0:
            return False
    return True

pod = []
for i in range(125697, 190235):
    delit = []

    for j in range(2, int(i ** 0.5) + 1):
        if i % j == 0:
            if isProst(j) and isProst(i // j ) and j != i//j:
                pod.append(i)
            else:
                break
print(len(pod), max(pod))
print(time() - start, "sec")