diff options
Diffstat (limited to 'math_utils.py')
| -rw-r--r-- | math_utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/math_utils.py b/math_utils.py index 2e12699..56fb707 100644 --- a/math_utils.py +++ b/math_utils.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 +import functools import math from typing import List from heapq import heappush, heappop @@ -60,6 +61,7 @@ def truncate_float(n: float, decimals: int = 2): return int(n * multiplier) / multiplier [email protected]_cache(maxsize=1024, typed=True) def is_prime(n: int) -> bool: """Returns True if n is prime and False otherwise""" if not isinstance(n, int): |
