项目作者: Kevin2408
项目描述 :
Write a Python program to find Perfect numbers from 2 to ?, where ? is input by the user. According to Wikipedia : In number theory, a perfect number is a positive integer that is equal to the sum of its proper positive divisors (一個數恰好等於它的因數之和), that is, the sum of its positive divisors excluding the number itself. Equivalently, a perfect number is a number that is half the sum of all of its positive divisors (including itself). For example, the first perfect number is 6, because 1, 2, and 3 are its proper positive divisors, and 1 + 2 + 3 = 6. Equivalently, the number 6 is equal to half the sum of all its positive divisors: ( 1 + 2 + 3 + 6 ) / 2 = 6. The next perfect number is 28 = 1 + 2 + 4 + 7 + 14.
高级语言: Python
项目地址: git://github.com/Kevin2408/perfect-number.git