如题所述
m = eval(input('请输入头:'))
n = eval(input('请输入脚:'))
for i in range(m + 1):
if i * 2 + (m - i) * 4 == n:
print('兔子{}只,鸡{}只'.format(m-i, i))