Python代码:判断简单加法算式个数
n = int(input()) count = 0 for i in range(n-2): a = i b = i + 1 c = i + 2 if a%10 + b%10 + c%10 < 10 and a//10%10 + b//10%10 + c//10%10 < 10 and a//100 + b//100 + c//100 < 10: count += 1 print(count)
原文地址: https://www.cveoy.top/t/topic/nZGS 著作权归作者所有。请勿转载和采集!