n = eval(input())
factorList = []
for i in range(1,n+1):
if n%i == 0:
factorList.append(i)
if sum(factorList) > 2*n:
print('盈數')
if sum(factorList) == 2*n:
print('完全數')
if sum(factorList) < 2*n:
print('虧數')
n = eval(input())
factorList = []
for i in range(1,n+1):
if n%i == 0:
factorList.append(i)
if sum(factorList) > 2*n:
print('盈數')
if sum(factorList) == 2*n:
print('完全數')
if sum(factorList) < 2*n:
print('虧數')
多筆輸入,直到EOF結束
另外建議eval改成int