mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
66c50b35ce
commit
85b4149074
@ -1,4 +1,5 @@
|
||||
import math
|
||||
|
||||
"""
|
||||
An Armstrong number is equal to the sum of its own digits each raised to the
|
||||
power of the number of digits.
|
||||
@ -31,7 +32,7 @@ def armstrong_number(n: int) -> bool:
|
||||
temp = n
|
||||
# Calculation of digits of the number
|
||||
number_of_digits = math.floor(math.log10(temp)) + 1
|
||||
|
||||
|
||||
# Dividing number into separate digits and find Armstrong number
|
||||
temp = n
|
||||
while temp > 0:
|
||||
|
Loading…
Reference in New Issue
Block a user