题解 | 水仙花数 py测区域间
水仙花数
https://www.nowcoder.com/practice/dc943274e8254a9eb074298fb2084703
import sys
for line in sys.stdin:
m,n=map(int,line.strip().split())
a=[]
for b in range(m,n+1):
hundreds=b//100
tens=(b//10)%10
units=b%10
if hundreds ** 3 + tens ** 3 + units ** 3 == b:
a.append(str(b))
print(' '.join(a)if a else 'no')
