题解 | #百钱买百鸡问题#
百钱买百鸡问题
http://www.nowcoder.com/practice/74c493f094304ea2bda37d0dc40dc85b
test=input()
for i in range(100):
for j in range(100-i):
if 5*i+3*j+(100-i-j)/3==100:
print(str(i)+' '+str(j)+' '+str(100-i-j))
百钱买百鸡问题
http://www.nowcoder.com/practice/74c493f094304ea2bda37d0dc40dc85b
test=input()
for i in range(100):
for j in range(100-i):
if 5*i+3*j+(100-i-j)/3==100:
print(str(i)+' '+str(j)+' '+str(100-i-j))
相关推荐