n = int(input())
min_num = 10 ** (n-1)
max_num = 10 ** n
s = 0
count = n
for i in range(min_num,max_num):
temp = i
while count >= 1:
a = temp%10
temp = temp//10
s += a**n
count -= 1
if i == s:
print(i)
s = 0
count = n
浙大版《Python 程序设计》题目集 第4章-17 水仙花数(20 分) (20分)
