The proper divisors of n are all its positive divisors except n itself. Write classify_number(n) that returns:
"perfect"if the proper divisors add up to exactlyn,"abundant"if they add up to more thann,"deficient"if they add up to less thann.
Examples
Input: n = 6
Output: "perfect"
Explanation: 1 + 2 + 3 = 6.
Input: n = 12
Output: "abundant"
Explanation: 1 + 2 + 3 + 4 + 6 = 16 > 12.
Input: n = 8
Output: "deficient"
Constraints
1 <= n <= 10**81has no proper divisors, so its sum is0.
Goals
- Sum the proper divisors of a number
- Return one of several strings based on a comparison