Company: Nokia_8march
Difficulty: medium
Determine Armstrong Problem Description A positive integer X is an Armstrong number if it is equal to the sum of the N-th powers of its digits, where N is the number of digits in X. You are given several numbers. For each number X, print YES if X is an Armstrong number, otherwise print NO . Function Description Complete the function solve . It takes one parameter and returns the answer as a string. X : the number to check. Return "YES" if X is an Armstrong number, otherwise return "NO" . The provided code reads the input, calls solve once for each test case, and prints each returned value on its own line. Input Format The first line contains an integer T, the number of test cases. Each of the next T lines contains a single integer X. Output Format For each test case, print YES or NO on its own line, in the same order as the input. Print the words exactly in uppercase. (inferred - the source sample prints uppercase YES / NO ; other casings are not accepted.) Examples Example 1 Input: 2