for i in range(100,1000): x = i//100 y = (i//10)%10 z = (i%100)%10 a = 0 num = x**3+y**3+z**3 if(i==num): print("%d是水仙花数"%i)