diff --git a/maths/sum_of_digits.py b/maths/sum_of_digits.py index d5488bb9e9e0..68f70c686c01 100644 --- a/maths/sum_of_digits.py +++ b/maths/sum_of_digits.py @@ -31,7 +31,7 @@ def sum_of_digits_recursion(n: int) -> int: 0 """ n = abs(n) - return n if n < 10 else n % 10 + sum_of_digits(n // 10) + return n if n < 10 else n % 10 + sum_of_digits_recursion(n // 10) def sum_of_digits_compact(n: int) -> int: