Example
The number 6 is perfect since its factors (other than 6) are 1, 2, and 3.
1 + 2 + 3 = 6
Return 1 for true (perfect), otherwise 0.
Solution Stats
Problem Comments
4 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers48
Suggested Problems
-
Rotate input square matrix 90 degrees CCW without rot90
679 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
398 Solvers
-
Find the index of n in magic(n)
271 Solvers
-
112 Solvers
-
122 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Could you improve your test suite with more test cases? (e.g. 496, 28 (true) and 26, 500 (false))
I added some more tests.
See problem 1012.
The point "the sum of its factors" is not correct. it must be "the sum of all his divisors"... :-/