Skip to content

Commit 6ca69ac

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 8ba7fc5 commit 6ca69ac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

maths/armstrong_number.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from typing import Union
22

3+
34
def is_armstrong_number(n: int) -> bool:
45
"""
56
Check whether a non-negative integer is an Armstrong (narcissistic) number.
@@ -37,4 +38,4 @@ def is_armstrong_number(n: int) -> bool:
3738
# Sum of each digit raised to the 'power'
3839
total = sum(int(d) ** power for d in digits)
3940

40-
return total == n
41+
return total == n

0 commit comments

Comments
 (0)