Problem 2544. Determine if given number is perfect
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
Show
1 older comment
Ned Gulley
on 4 Sep 2014
I added some more tests.
Jean-Marie Sainthillier
on 6 Sep 2014
See problem 1012.
J.R.! Menzinger
on 16 Sep 2014
The point "the sum of its factors" is not correct. it must be "the sum of all his divisors"... :-/
Solution Comments
Show commentsProblem Recent Solvers42
Suggested Problems
-
15955 Solvers
-
Determine whether a vector is monotonically increasing
21800 Solvers
-
Program an exclusive OR operation with logical operators
730 Solvers
-
We love vectorized solutions. Problem 1 : remove the row average.
841 Solvers
-
square a vector-Given the variable x as your input, square it and put the result in y.
109 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!