All Submissions


Perfect Numbers are those numbers which are equal to sum of their divisors(excluding themselves).
For example 6 is perfect number because it is equal to sum of it's divisors.
6=1+2+3, where 1,2 and 3 divides 6.

In this program given an Integer value you have to check if it is a perfect number or Not.

Input
First Line contains Number of Test cases T
Next T lines Lines contains a positive Integer.

Output
T lines of output.
If the ith Integer is Perfect , print PERFECT.
else print NOT PERFECT.

Constraints
T<=1000
Each Number will be less than 10000.

Sample Input
2
5
6

Sample Output
NOT PERFECT
PERFECT

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