We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b720f4 commit 53056f7Copy full SHA for 53056f7
maths/is_armstrong.py
@@ -11,10 +11,10 @@ def is_armstrong(n: int) -> bool:
11
12
digits = list(map(int, str(n)))
13
num_digits = len(digits)
14
- return n == sum(d ** num_digits for d in digits)
+ return n == sum(d**num_digits for d in digits)
15
16
17
if __name__ == "__main__":
18
print(is_armstrong(153)) # True
19
print(is_armstrong(370)) # True
20
- print(is_armstrong(10)) # False
+ print(is_armstrong(10)) # False
0 commit comments