#C10315. Perfect or Deficient Number Classification
Perfect or Deficient Number Classification
Perfect or Deficient Number Classification
In this problem, you are given a positive integer n. Your task is to classify the number as either perfect or deficient.
A number is said to be \(\textbf{perfect}\) if it is equal to the sum of its proper divisors. That is, if \(n\) is greater than 1, and \[ \sum_{i=1}^{n-1} \textbf{ if }\; i \mid n \;\textbf{ then } i \neq n \textbf{ else } 0 = n, \] then \(n\) is perfect. Otherwise, if the sum of its proper divisors is less than \(n\), it is called deficient.
Note: For the purpose of this problem, if a number is not perfect, we consider it as deficient.
inputFormat
The input consists of a single integer n provided via standard input (stdin).
outputFormat
Output a single line containing either perfect
if n is a perfect number, or deficient
if it is not. The output should be written to standard output (stdout).
6
perfect
</p>