请写一下这个程序吧!

用while循环输出100-999之间的所有水仙花数。(水仙花数是指一个三位数,其各个位上的数字的立方和等于该数字本身。例如:1^3 + 5^3 + 3^3 = 153)

x = 100
while x<=999:
    a = x//100
    b = x%100//10
    c = x%10
    if a**3+b**3+c**3==x:
        print(x)
    x+=1

i = 100
while i<=999:
    s = str(i)
    n1 = int(s[0])
    n2 = int(s[1])
    n3 = int(s[2])
    if(i == (n1**3 + n2**3 + n3**3)):
        print(i)
    i += 1
    

img