Cody

Problem 1012. Determine if input is a perfect number

A perfect number occurs whent the sum of all divisors of a positive integer, except the number itself, equals the number.

Example

 28 = 1 + 2 + 4 + 7 + 14;

so return true

 10 ~= 1 + 2 + 5

so return false

Solution Stats

51.3% Correct | 48.7% Incorrect
Last solution submitted on Aug 29, 2016
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Join the 15-year community celebration.

Play games and win prizes!

Learn more