题解 | #百钱买百鸡问题#
https://www.nowcoder.com/practice/74c493f094304ea2bda37d0dc40dc85b
import java.util.*;
public class Main{
public static void main(String[] args){
for(int i=0;i<100;i++){
for(int j=0;j<100-i;j++){
if((5*i + 3*j + (100-i-j)/3) == 100 && (100-i-j)%3==0){
System.out.println(i+" "+j+" "+(100-i-j));
}
}
}
}
}
public class Main{
public static void main(String[] args){
for(int i=0;i<100;i++){
for(int j=0;j<100-i;j++){
if((5*i + 3*j + (100-i-j)/3) == 100 && (100-i-j)%3==0){
System.out.println(i+" "+j+" "+(100-i-j));
}
}
}
}
}