The Deficient Number
EasyAcc. 96.8%
+15 XP 5
Minimalist Factors
A Deficient Number is an integer where the sum of its proper divisors is less than the number itself. Most prime numbers are deficient!
The Assignment
Your function receives a parameter num.
- Calculate the sum of proper divisors using a loop.
- If the sum is less than
num, print "true", otherwise "false".
01EXAMPLE 1
Input
num=8Output
trueExplanation: Divisors: 1, 2, 4 (sum 7). 7 < 8.
Constraints
- Use a loop to find divisors.
- Exclude the number itself from the sum.
MathLoops
JavaScriptSystem handles I/O — write your function only
Loading...
3 Hidden
Input Arguments
num8
Expected Output
true
Click RUN to test your solution