Loading...
Python-OYP-203 - Perfect Number
Time: 10 s
Memory: 125 MB
Perfect numbers are positive integers that are equal to the sum of their proper divisors. The first few perfect numbers are 6, 28, 496, 8128, and so on. Here, the smallest perfect number is 6, which is the sum of its proper divisors 1, 2, and 3. 

Perfect numbers have fascinated mathematicians for thousands of years and have many interesting properties. The discovery of such numbers is lost in prehistory. It is known, however, that the Pythagoreans (founded c. 525 BCE) studied perfect numbers for their “mystical” properties.

The mystical tradition was continued by the Neo-Pythagorean philosopher Nicomachus of Gerasa (fl. c. 100 CE), who classified numbers as deficient, perfect, and superabundant according to whether the sum of their divisors was less than, equal to, or greater than the number, respectively. Nicomachus gave moral qualities to his definitions, and such ideas found credence among early Christian theologians. Often the 28-day cycle of the Moon around the Earth was given as an example of a “Heavenly,” hence perfect, event that naturally was a perfect number.
Input
You will be given an arbitrary integer number (N)
Output
Your task is to write a program that prints "Perfect Number" if the given number is perfect and prints "Not Perfect Number" if it is not a perfect number.
Examples
Input
Output
6
Perfect Number
Input
Output
10
Not Perfect Number
Problem Info
Problem ID 128
Time Limit 10000 ms
Memory Limit 128000 KB
Moderators muncityuni
Statistics
Submit
You need to Login or Registration for submit your solution