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