Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
46369 蔡璟恒 水仙花数 Python3 Accepted 35 MS 3792 KB 354 2023-04-16 15:12:15

Tests(10/10):


Code:

a,b=map(int,input().split()) l=[] for i in range(a,b+1): count=0 s=str(i) for j in range (len(s)): count+=int(s[j])*int(s[j])*int(s[j]) if count==i: l.append(i) if len(l)==0: print("no") else: for i in range(len(l)): print(l[i],end="") if i!=len(l)-1: print("",end=" ")