for i in range(2,1000):
s=1
for j in range(2,i):
if i%j==0:
m=i/j
s=s+m
if s==i:
print i,
转载于:https://www.cnblogs.com/jietingting/p/7076942.html
for i in range(2,1000):
s=1
for j in range(2,i):
if i%j==0:
m=i/j
s=s+m
if s==i:
print i,
转载于:https://www.cnblogs.com/jietingting/p/7076942.html