题解 | #完全数计算#
完全数计算
https://www.nowcoder.com/practice/7299c12e6abb437c87ad3e712383ff84
num_range = int(input())
count = 0
for num in range(1 , num_range+1):
lst = []
for i in range(1,num): #lst will save all the factors
if num%i==0:
lst.append(i)
if sum(lst) == num:
count += 1
print(count)