Rebuild from Digits
An Armstrong number is a number that can be rebuilt from its own digits. The function is_armstrong_number receives number, raises each digit to the power of the total digit count, adds the results, and compares the sum with the original number. Return True if they match, otherwise return False.
Примеры
Ввод
5Вывод
TrueВвод
10Вывод
FalseВвод
153Вывод
TrueНужно реализовать
def is_armstrong_number(number: int) -> bool:
Теги
math
Conectează-te pentru a vedea istoricul soluțiilor trimise
Conectează-teConectează-te pentru a folosi Mentorul AI
Conectează-teVisible tests
1
Input
5Expected
True2
Input
10Expected
False3
Input
153Expected
True4
Input
154Expected
False5
Input
9474Expected
True6
Input
9926315Expected
TrueFocus radio
Paused · SomaFM · Fluid