|시간 제한||메모리 제한||제출||정답||맞힌 사람||정답 비율|
|8 초 (추가 시간 없음)||1024 MB||196||61||47||31.544%|
A divisor of a positive integer n is an integer d where m = n d is an integer. In this problem, we define the aliquot sum s(n) of a positive integer n as the sum of all divisors of n other than n itself. For examples, s(12) = 1 + 2 + 3 + 4 + 6 = 16, s(21) = 1 + 3 + 7 = 11, and s(28) = 1 + 2 + 4 + 7 + 14 = 28.
With the aliquot sum, we can classify positive integers into three types: abundant numbers, deficient numbers, and perfect numbers. The rules are as follows.
You are given a list of positive integers. Please write a program to classify them.
The first line of the input contains one positive integer T indicating the number of test cases. The second line of the input contains T space-separated positive integers n1, ..., nT.
Output T lines. If ni is an abundant number, then print
abundant on the i-th line. If ni is a deficient number, then print
deficient on the i-th line. If ni is a perfect number, then print
perfect on the i-th line.
3 12 21 28
abundant deficient perfect