题解 | #完全数计算#
完全数计算
http://www.nowcoder.com/practice/7299c12e6abb437c87ad3e712383ff84
n = int(input())
if n <= 2:
print(0)
else:
r = 0
for i in range(3, n):
k = [1]
for j in range(2, i):
if not i % j:
k.append(j)
if sum(k) == i:
r += 1
print(r)