题解 | #百钱买百鸡问题#
百钱买百鸡问题
http://www.nowcoder.com/practice/74c493f094304ea2bda37d0dc40dc85b
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
if(sc.hasNext()){
int input = sc.nextInt();
for(int x=0;x<=14;x++){
if((100-7*x)%4==0){
int y =(100-7*x)/4;
int z=100-y-x;
System.out.println(x+" "+y+" "+z);
}
}
}
}
}