for a in range(100,1000): c=str(a) b=0 for i in c : b+=(int(i))**3 if b==a: print(a)#按照这个代码进行水仙花数的统计,结果会多出来一个370,检查不出来bug
收起
370不是水仙花数嘛?
报告相同问题?