奇妙数
# question : outputs the magic number of all 2-digit number
# 1,outputs all 2-digit number
# 2,judge if the number is magic number
# 3, magic number:such as 39=3+9+3*9
# 1,use loop get all 2-digit number
for ab in range(10,100,1):
a = ab//10
b = ab%10
if ab==(a+b)+(a*b): #
print(ab)
水仙花数
# 'narcissi few 'refers to a triple-digit,the number of cubic you and
# equal to the number itself.
# please output all 'narcissi few '.
# such as :153=1*1*1+5*5*5+3*3*3
# 1, get all 3-digit number
for abc in range(100,1000,1):
a = abc//100
b = abc%100//10
c = abc%10
if abc==a*a*a+b*b*b+c*c*c:
print(abc)
作业
# homework:
# 1,a 2-digit number,print all the two-digit number 2
# more than the ten-digit number.
# 2,such as 1634=1*1*1*1+6*6*6*6+3*3*3*3+4*4*4*4
# print all that 4-digit numbers



