问题描述
解决方案
不会python语言,替你搜一份,http://www.bicner.com/180.html
解决方案二:
import math
def isCompleteNum(num):
sum = 0
for i in range(1,num//2+1):
if num % i == 0:
sum += i
if sum == num:
print '%d is a complete number' % num
else:
print '%d is NOT a complete number' % num
if name == '__main__':
num = int(raw_input('Plz input a number:n'))
isCompleteNum(num)
时间: 2024-12-31 20:54:30