1075: 聚餐人数统计
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);int n=cin.nextInt();int cost=cin.nextInt();int flag=0;for(int i=0;i<=cost;i++)for(int j=0;j<=cost;j++)for(int k=0;k<=cost;k++)if(i+j+k==n&&i*3+j*2+k==cost){
System.out.printf("%d %d %d\n",i,j,k);flag=1;}if(flag==0) System.out.println("No answer");}
}