From a1f6688f1e06e2ca5826282e15fa09897382e4bb Mon Sep 17 00:00:00 2001 From: Grigoriy Hanin <43445998+haningrisha@users.noreply.github.com> Date: Sun, 30 May 2021 14:55:18 +0300 Subject: [PATCH 1/2] * 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 --- maths/armstrong_numbers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maths/armstrong_numbers.py b/maths/armstrong_numbers.py index d30ed2e430a0..7933f0ce65b2 100644 --- a/maths/armstrong_numbers.py +++ b/maths/armstrong_numbers.py @@ -1,5 +1,5 @@ """ -An Armstrong number is equal to the sum of the cubes of its digits. +An Armstrong number is equal to the sum of its own digits each raised to the power of the number of digits. For example, 370 is an Armstrong number because 3*3*3 + 7*7*7 + 0*0*0 = 370. An Armstrong number is often called Narcissistic number. """ From 0a2d04e2d3d86d49d184b6c4e92bf758c0e86b9f Mon Sep 17 00:00:00 2001 From: Grigoriy Hanin <43445998+haningrisha@users.noreply.github.com> Date: Mon, 31 May 2021 01:06:22 +0300 Subject: [PATCH 2/2] Update armstrong_numbers.py Line shorten --- maths/armstrong_numbers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/maths/armstrong_numbers.py b/maths/armstrong_numbers.py index 7933f0ce65b2..af25688dbacc 100644 --- a/maths/armstrong_numbers.py +++ b/maths/armstrong_numbers.py @@ -1,5 +1,6 @@ """ -An Armstrong number is equal to the sum of its own digits each raised to the power of the number of digits. +An Armstrong number is equal to the sum of its own digits each raised +to the power of the number of digits. For example, 370 is an Armstrong number because 3*3*3 + 7*7*7 + 0*0*0 = 370. An Armstrong number is often called Narcissistic number. """