Problem ID: deficient-perfect-and-abundant
Time Limit: 1.0 seconds
Memory Limit: 32.0 MB
Difficulty: Medium
Deficient, Perfect, and Abundant
Description
Write a program that repeatedly reads a positive integer, determines if the integer is deficient, perfect, or abundant, and outputs the number along with its classification.
Input format
A positive integer, n, is said to be perfect if the sum of its proper divisors equals the number itself. (Proper divisors include 1 but not the number itself.) If this sum is less that n, the number is deficient, and if the sum is greater than n, the number is abundant.
Output format
The input starts with the number of integers that follow. For each of the following integers, your program should output the classification, as given below. You may assume that the input integers are greater than 1 and less than 32500.