Modernize code to Python 3.6+ and some cleanup

This commit is contained in:
Miroslav Šedivý
2021-01-31 22:48:38 +01:00
parent 93bb4407fa
commit b69e0c2023
86 changed files with 153 additions and 189 deletions

View File

@@ -18,7 +18,7 @@ async def is_prime(n):
return False
sleep = asyncio.sleep # <1>
root = int(math.floor(math.sqrt(n)))
root = math.floor(math.sqrt(n))
for i in range(3, root + 1, 2):
if n % i == 0:
return False