题解 | #百钱买百鸡问题#

百钱买百鸡问题

https://www.nowcoder.com/practice/74c493f094304ea2bda37d0dc40dc85b

ent = input()
for x in range(0,21):
    for z in range(0,301,3):
        y = 100 - x - z
        money = 5*x + 3*y + z//3
        if y >= 0 and money == 100:
            print(x, y, z, sep = ' ')

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务