LC: 1134. Armstrong Number
Input: n = 153
Output: true
Explanation: 153 is a 3-digit number, and 153 = 1³ + 5³ + 3³.Input: n = 123
Output: false
Explanation: 123 is a 3-digit number, and 123 != 1³ + 2³ + 3³ = 36.Last updated
Input: n = 153
Output: true
Explanation: 153 is a 3-digit number, and 153 = 1³ + 5³ + 3³.Input: n = 123
Output: false
Explanation: 123 is a 3-digit number, and 123 != 1³ + 2³ + 3³ = 36.Last updated
class Solution {
public boolean isArmstrong(int n) {
}
}