Armstrong Number — C# Coding Problem
Difficulty: easy | Category: math
Problem Description
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 itself. For example, `153` is Armstrong because `1³ + 5³ + 3³ = 153`. Given an integer `n`, return `true` if it is an Armstrong number, `false` otherwise.
Examples
Example 1
Input: n = 153
Output: true
Explanation: 1³ + 5³ + 3³ = 153.
Example 2
Input: n = 370
Output: true
Example 3
Input: n = 123
Output: false