A number is narcissistic (also called an Armstrong number) if it equals the sum of its digits each raised to the power of the number of digits. For example 371 has 3 digits and 3**3 + 7**3 + 1**3 = 27 + 343 + 1 = 371.
Write is_armstrong(n) that returns True if n is narcissistic and False otherwise.
Examples
Input: n = 371
Output: True
Input: n = 1634
Output: True
Input: n = 10
Output: False
Constraints
0 <= n <= 10**12- Every single-digit number (including
0) is narcissistic.
Goals
- Count the digits before processing them
- Combine digit extraction with exponentiation