题目描述
Print all “Daffodil number”.
The daffodil number is one of the famous interesting numbers in the mathematical world. A daffodil number is a three-digit number whose value is equal to the sum of cubes of each digit.
For example. 153 is a daffodil as 153=13+53+3^3.
Output:
153
???
???
???
输入
None
输出
All daffodil numbers, from smallest to largest, one result one line.
for i in range(2,1000):
a=i//100
b=i//10%10
c=i%10
if(i==a*a*a+b*b*b+c*c*c):
print(i)