题解 | #完全数计算#
完全数计算
http://www.nowcoder.com/practice/7299c12e6abb437c87ad3e712383ff84
while True:
try:
n=int(input())
num =0
for i in range(1,n+1):
s=[]
for j in range(1,i+1):
if i%j==0 and i!=j:
s.append(j)
if i== sum(s):
num+=1
print(num)
except:
break