All Submissions


Armstrong Numbers are those numbers which are equal ro sum of cubes of their digits.
For example 153, (1*1*1) + (5*5*5) +(3*3*3) = 1+125+27=153.

You task is to check if a number is Armstrong or not.

Input
First Line Contains T denoting the number of test cases that follow.
Next T lines contains a positive Integer.

Output
For every Input Integer,
If it an Armstrong Number , print ARMSTRONG
else print NOT ARMSTRONG

constraints
T<=1000
Every numnber is between 1 and 1000.

Sample Input
2
153
154

Sample Output
ARMSTRONG
NOT ARMSTRONG

Problem Setter : Arjun Singh Bhatia



Languages: Brain,C,C++,Java,Pascal,Perl,PHP,Python,Ruby,Text

Time Limit: 3 Second(s)
Score: 0 Point(s)
Input File Limit: 50000 Bytes

Submit

Login to post clarification.

No Clarifications.

Contest

Mode Judge

Passive

Online

Overall Rankings

RankNameScore
1xyz0
2Ams0
3TIP0
4team420
5xyzz0
6asdasdasd0
7abcd0
8khankhan0
9Gabriel0
10gigel0