赞
踩
- def narcissus(x):
- if int(x)==pow(int(x[0]),3)+pow(int(x[1]),3)+pow(int(x[2]),3):
- return 1
- else:
- return 0
- while True:
- m,n = map(int,input().split())
- key = 0
- for i in range(m,n+1):
- if narcissus(str(i))==1:
- print(i,end=" ")
- key = 1
- if key == 0:
- print("no")
- else:
- print("")
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。