def flowerNumer(n): n1 = sum(int(i) ** 3 for i in list(n)) return n if (int(n) == n1) else 0 if __name__ == '__main__': num_list = [str(i) for i in range(100, 1000) if flowerNumer(str(i))] print("所有的水仙花数有:" + ','.join(num_list))