Skip to content
Snippets Groups Projects
Commit 0a003671 authored by Taddeus Kroes's avatar Taddeus Kroes
Browse files

Solved 46

parent 5f5961bc
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python
from utils import primes_until
MAX = 10000
comps = [False] * MAX
comps[1] = True
for p in primes_until(MAX - 1):
q = 1
comps[p] = True
while True:
pplusq = p + 2 * q ** 2
if pplusq >= MAX:
break
comps[pplusq] = True
q += 1
for i, passed in enumerate(comps):
if i & 1 and not passed:
print i
break
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment