题解 | #完全数计算#
完全数计算
http://www.nowcoder.com/practice/7299c12e6abb437c87ad3e712383ff84
while True:
try:
n=int(input())
L=[]
for i in range(1,n):
p=0
for y in range(1,i):
if i%y==0:
p=p+y
if i==p:
L.append(p)
print(len(L))
except:
break
联想公司福利 1512人发布
查看22道真题和解析