for x in range(0,10):#、? if x ==5: print(x) for ab in range(10,100): a=ab//10 b=ab%10 if a+b==5: print(ab) for abc in range(100,1000): a=abc//100 bc=abc%100 b=bc//10 c=bc%10 if a+b+c==5: print(abc)
转载于:https://www.cnblogs.com/haishangmingdeng/p/11348269.html