From 51ed3838abca564657f92d532d7393978dc782d2 Mon Sep 17 00:00:00 2001 From: Daniele Fucini Date: Sun, 29 Sep 2024 14:53:16 +0200 Subject: [PATCH] Fix type hints in projecteuler.py --- Python/projecteuler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Python/projecteuler.py b/Python/projecteuler.py index 746f3d9..76697e5 100644 --- a/Python/projecteuler.py +++ b/Python/projecteuler.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -from typing import Callable, List, ParamSpec, Tuple, TypeVar +from typing import Callable, List, ParamSpec, Sequence, Tuple, TypeVar from functools import wraps from math import sqrt, floor, ceil, gcd from timeit import default_timer @@ -78,7 +78,7 @@ def lcm(a: int , b: int) -> int: # Recursive function to calculate the least common multiple of more than 2 numbers. -def lcmm(values: List[int], n: int) -> int: +def lcmm(values: Sequence[int], n: int) -> int: # If there are only two numbers, use the lcm function to calculate the lcm. if n == 2: return lcm(values[0], values[1])