Пример #1
0
Файл: p7.py Проект: cadizm/euler
def run():
    key = 10001
    i = 1
    P = eratosthenes(key * i)
    while len(P) < key:
        i *= 2
        P = eratosthenes(key * i)
    print P[key - 1]
Пример #2
0
def run():
    P = eratosthenes(6500)  # 6500 by trial/error
    t = TriangleNumberGenerator()
    while True:
        n = t.next()
        if ndivisors(n, P) > 500:
            print n
            break
Пример #3
0
def run():
    P = eratosthenes(6500)  # 6500 by trial/error
    t = TriangleNumberGenerator()
    while True:
        n = t.next()
        if ndivisors(n, P) > 500:
            print n
            break
Пример #4
0
def run():
    print sum(eratosthenes(2000000))
Пример #5
0
def run():
    print sum(eratosthenes(2000000))