1074: 百钱买百鸡
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);int n=cin.nextInt();int flag=0;for(int i=0;i<=100;i++)for(int j=0;j<=100;j++)for(int k=0;k<=100;k++)if(i+j+k==n&&i*15+j*9+k==n*3){
System.out.printf("%4d%4d%4d\n",i,j,k);flag=1;}if(flag==0) System.out.println("No Answer");}
}