Log in
← All problems

Armstrong number

mediumMaths and loops40 XP (problem of the day)

A number is an Armstrong number if the sum of its digits, each raised to the power of the number of digits, equals the number: 153 = 1³ + 5³ + 3³. Return whether n (0 or more) is one.

Examples

Examples use JSON: true/false/null are True/False/None in Python.

Run examples checks the examples above. Submit also runs 5 hidden tests.