Armstrong Number Problem Statement
You are provided an integer 'NUM'. Determine if 'NUM' is an Armstrong number.
Explanation:
An integer 'NUM' with 'k' digits is an Armstrong number if the sum of its digits, each raised to the power of 'k', equals the number itself.
Input:
T, followed by T values of NUM
Output:
For each NUM, output 'YES' if it's an Armstrong number, 'NO' otherwise.
Example:
Input:
2
153
123
Output:
YES
NO
Explanation: '153' is an Armstrong number, whereas '123' is not.
Constraints:
1 <= T <= 100
1 <= NUM <= 10^9
- Time Limit: 1 sec
Note:
Just implement the function as described; printing is handled for you.

AnswerBot
13d

Determine if a given integer is an Armstrong number by checking if the sum of its digits raised to the power of the number of digits equals the number itself.
Iterate through each digit of the number a...read more

Help your peers!
Add answer anonymously...
Top Optum Global Solutions Software Engineer interview questions & answers
Popular interview questions of Software Engineer
Top HR questions asked in Optum Global Solutions Software Engineer
>
Optum Global Solutions Software Engineer Interview Questions
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app