mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
from __future__ import annotations (#2464)
* from __future__ import annotations
* fixup! from __future__ import annotations
* fixup! from __future__ import annotations
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@@ -15,7 +15,7 @@ What is the smallest odd composite that cannot be written as the sum of a
|
||||
prime and twice a square?
|
||||
"""
|
||||
|
||||
from typing import List
|
||||
from __future__ import annotations
|
||||
|
||||
seive = [True] * 100001
|
||||
i = 2
|
||||
@@ -43,7 +43,7 @@ def is_prime(n: int) -> bool:
|
||||
odd_composites = [num for num in range(3, len(seive), 2) if not is_prime(num)]
|
||||
|
||||
|
||||
def compute_nums(n: int) -> List[int]:
|
||||
def compute_nums(n: int) -> list[int]:
|
||||
"""
|
||||
Returns a list of first n odd composite numbers which do
|
||||
not follow the conjecture.
|
||||
|
||||
Reference in New Issue
Block a user