logo AlgoBeat OnlineJudge
登录 注册

#215996. [TOPC 2021] Aliquot Sum

内存限制:512 MiB 时间限制:8000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

A divisor of a positive integer is an integer where is an integer. In this problem, we define the aliquot sum of a positive integer as the sum of all divisors of other than itself. For examples, , , and .

With the aliquot sum, we can classify positive integers into three types: abundant numbers, deficient numbers, and perfect numbers. The rules are as follows.

  1. A positive integer is an abundant number if .
  2. A positive intewer is a deficient number if .
  3. A positive integer is a perfect number if .

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 indicating the number of test cases. The second line of the input contains space-separated positive integers .

输出格式

Output lines. If is an abundant number, then print abundant on the -th line. If is a deficient number, then print deficient on the -th line. If is a perfect number, then print perfect on the -th line.

样例

样例输入 1

3
12 21 28

样例输出 1

abundant
deficient
perfect

数据范围与提示

  • for .