题解 | #百钱买百鸡问题#
百钱买百鸡问题
http://www.nowcoder.com/practice/74c493f094304ea2bda37d0dc40dc85b
if __name__ == "__main__":
start = input()
"""
根据多元方程计算出鸡翁(x)与鸡母(y)的关系:7x+4y=100;鸡雏(z)=100-x-y
"""
for x in range(100//7):
validY = (100 - 7*x)%4
if validY == 0:
y = (100 - 7*x)/4
z = 100 - x - y
print(str(int(x))+" "+str(int(y))+" "+str(int(z)))