From 35ec6381d0f4ff81ba39664065f5414edd822284 Mon Sep 17 00:00:00 2001 From: Flancian <0@flancia.org> Date: Sat, 14 Oct 2023 21:53:51 +0200 Subject: [PATCH] autopushed --- bin/prime.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/prime.py b/bin/prime.py index 6fb1605b0..4194f81b9 100755 --- a/bin/prime.py +++ b/bin/prime.py @@ -8,6 +8,7 @@ import math import sys # I'm not proud (I am a little bit?). +SIEVE = [] PROOF = [] # :) LOG = [] # :) @@ -16,7 +17,7 @@ def factor(n): click.echo(f"Is {i} a factor of {n}, I wonder?") def is_prime(n): - is_prime = [True for n in range(0, n+1)] + SIEVE = [True for n in range(0, n+1)] upto = math.ceil(math.sqrt(n)) for i, _ in enumerate(is_prime): # click.echo(f"i: {i}")