Ezvor

1134. Armstrong Number

EasyMath Preparing judge… LeetCode
Math

Hints

Hint 1
Check if the given k-digit number equals the sum of the k-th power of it's digits.
Hint 2
How to compute the sum of the k-th power of the digits of a number ? Can you divide the number into digits using division and modulus operations ?
Hint 3
You can find the least significant digit of a number by taking it modulus 10. And you can remove it by dividing the number by 10 (integer division). Once you have a digit, you can raise it to the power of k and add it to the sum.