Python-100-Days
Python-100-Days copied to clipboard
day05 百钱百鸡代码示例错误
for x in range(0, 21): for y in range(0, 34): z = 100 - 5 * x - 3 * y if x * 5 + 3 * y + z == 100 and z >= 0: print('公鸡: %d只, 母鸡: %d只, 小鸡: %d只' % (x, y, z))
想一想为什么运算结果是一样的