题解 | #完全数计算#
完全数计算
http://www.nowcoder.com/practice/7299c12e6abb437c87ad3e712383ff84
while True:
try:
a = int(input())
res = 0
for i in range(1,a+1):
s=0
for j in range(1,i//2+1):
if i%j == 0:
s=s+j
if s== i:
res =res+1
print(res)
except:
break