nvim-config/test.py
2024-05-16 23:11:48 +01:00

19 lines
336 B
Python

def primes(n: int):
"""Return whether the number is prime for the first n primes."""
sieve = [True] * n
res = []
for i in range(2, n):
if sieve[i]:
res.append(i)
for j in range(i * i, n, i):
sieve[j] = False
return res
xs = primes(100)
ys = primes(200)
print(xs)