Write a function that tells if a natural @n@ is perfect.
A natural number is called perfect if it is equal to the sum of all its divisors except itself. For instance, 28 is perfect, because .
| C++ | |
| C | |
| Java | |
| Python | |
|
@n@ is a natural number.
You only need to submit the required procedure; your main program will be ignored.
Input/Output