题解 | #完全数计算#
完全数计算
http://www.nowcoder.com/practice/7299c12e6abb437c87ad3e712383ff84
while True:
try:
n=int(input())
list1=[]
result=0
if n<=5:
print("0")
else:
for i in range(1,n):
list1=[]
for j in range(1,i):
if i%j==0:
list1.append(j)
if sum(list1)==i:
result+=1
print(result)
except:
break
#暴力法,没啥好说的。