for g in range(0,21): #百钱百鸡
for m in range(0,34):
x=100 - g - m
if g * 5 + m *3 + x / 3 == 100:
print('公鸡:{},母鸡:{},小鸡:{}'.format(g,m,x))
百钱买百鸡--python
最新推荐文章于 2024-07-10 12:10:03 发布
for g in range(0,21): #百钱百鸡
for m in range(0,34):
x=100 - g - m
if g * 5 + m *3 + x / 3 == 100:
print('公鸡:{},母鸡:{},小鸡:{}'.format(g,m,x))