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

百钱买百鸡问题

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

public class Main{
    public static void main(String[] args) {


        for (int x=0;x<100;x++){
            for (int y=0;y<100;y++){

                    if (14*x+8*y==200){
                        System.out.println(x+" "+y+" "+(100-x-y));


                }
            }

        }
    }
}

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

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