a803. CPE:DPA Numbers I (UVa 13185)

簡單CPE

時間限制 2000 ms ・ 記憶體限制 256 MB

題目描述

計算正整數 n 的所有真因數之和;真因數是能整除 n、但不等於 n 的正整數。若總和小於 n,稱為 deficient(虧數);等於 n,稱為 perfect(完全數);大於 n,稱為 abundant(盈數)。請判定每個 n 的類別。

輸入格式

第一行為 t(1 ≤ t ≤ 500)。接著 t 行,每行有一個 n(2 ≤ n ≤ 1000)。

輸出格式

每筆資料輸出 deficient、perfect 或 abundant,占一行。

原題:https://onlinejudge.org/external/131/13185.pdf

範例測資

範例輸入 1

10
5
6
16
18
21
28
29
30
40
43

範例輸出 1

deficient
perfect
deficient
abundant
deficient
perfect
deficient
abundant
abundant
deficient
請先登入後再提交程式碼

討論與題解

載入討論區…

更多