示例#1
0
文件: task58.py 项目: kamil157/euler
def solve():
    primes = 0
    for i, n in enumerate(spiral(100000)):
        if is_prime(n):
            primes += 1
        if primes / (i + 1) < 0.1 and i % 4 == 0 and primes > 0:
            return i // 2 + 1
示例#2
0
def solve():
    size = 1001
    return sum(spiral((size - 1) // 2))