public class selfAddMinus{ public static void main(String[] args){ int x,y,z; for(x=0;x<=100;x++){ for(y=0;y<=100;y++){ for(z=0;z<=300;z+=3){ if(x+y+z ==100 && 5*x+3*y+z/3 ==100){ System.out.println(“gongji:”+x+”;muji:”+y+”;xiaoji:”+z+”;”); } } } } } }
版权归属:
wood
本文链接:
https://woodchen.ink/archives/for%E5%BE%AA%E7%8E%AF-%E7%99%BE%E9%92%B1%E4%B9%B0%E7%99%BE%E9%B8%A1
许可协议:
本文使用《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》协议授权
评论区