Skip to content

Commit b3b89d9

Browse files
authored
Armstrong number definition fix (TheAlgorithms#4466)
This is a documentation fix. This fix patches a mistake in the description of the Armstrong number. * * Doc fix * Armstrong number is not the sum of cube's of number digits, but the sum of number's digits each raised to the power of the number of digits * Update armstrong_numbers.py Line shorten
1 parent 650039a commit b3b89d9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

maths/armstrong_numbers.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""
2-
An Armstrong number is equal to the sum of the cubes of its digits.
2+
An Armstrong number is equal to the sum of its own digits each raised
3+
to the power of the number of digits.
34
For example, 370 is an Armstrong number because 3*3*3 + 7*7*7 + 0*0*0 = 370.
45
An Armstrong number is often called Narcissistic number.
56
"""

0 commit comments

Comments
 (0)