#打印所有水仙花数 num = 100 while num >= 100 and num < 1000: a = num // 100 b = num % 100 // 10 c = num % 10 if (a*a*a + b*b*b + c*c*c) == num: print(num) num = num + 1