726. Check if a Number is an Abundant Number
Given an integer n, return true if it is an Abundant Number, otherwise return false.
A number is called Abundant if the sum of its proper divisors (excluding the number itself) is greater than the number.
Example 1:
Input: 18
Output: true
Explanation: Divisors = 1, 2, 3, 6, 9 → Sum = 21 > 18 → Abundant
Example 2:
Input: 21
Output: false
Explanation: Divisors = 1, 3, 7 → Sum = 11 < 21 → Not Abundant
Now Your Turn!
Pick the correct output for the given inputInput: 12
Still unsure what the problem is asking ?
Let’s go through a few more examples, step by step, to make it clearer.
Constraints:
- 1 ≤ n ≤ 10⁶