Last active
January 21, 2022 18:28
-
-
Save nickponline/9a3fb1ee5333c52ed195625ea17c15b2 to your computer and use it in GitHub Desktop.
Solver for Primel (https://converged.yt/primel/)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A Primel Solver | |
# Sieve of Eratosthenes | |
N = 100000 | |
primes = [True] * N | |
for i in range(2, N): | |
if not primes[i]: | |
continue | |
k = i + i | |
while k < N: | |
primes[k] = False | |
k += i | |
useful = [ str(i) if primes[i] and len(str(i)) == 5 ] | |
# Plugin in your clues | |
for i in useful: | |
if i[0] == '6' and i[4] == '9' and ('3' in i) and ('5' in i) and ('8' in i): | |
print(i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment