Números largos de armstrong
while True:
n = input()
n1 = [int(d) for d in str(n)]
a = []
ans = 0
for i in n1:
a.append(i**len(n))
for j in a:
ans += int(j)
if ans == int(n):
print('This number is an armstrong number')
elif ans != int(j):
print("this number is not a armstrong number")
if n == 'stop' or ans == "Stop":
break
John Coder