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
- Input: n = 153Output: true
- Input: n = 154Output: false
Examples use JSON: true/false/null are True/False/None in Python.