Start: Jan, 04, 2017 19:40:00
2016年秋季学期程序设计基础期末考试
End: Jan, 04, 2017 21:40:00
Time elapsed:
Time remaining:

Problem_ID: F
Result: Accepted
Time: 1ms
Memory: 1092kB
Author: 2016212402027
In contest: 1084

#include<stdio.h>
#include<string.h>
#include<math.h>
void main()
{
	int n;
	char str[200];
	scanf("%d",&n);
	while(n--)
	{
		int m,x=0,y=0;
		scanf("%d",&m);
		if(m<2)
			printf("WA\n");
		else
		{
			for(int i=0;i<=m;++i)
			{
				if(i%2==0&&(m-i)%3==0)
				{
					x=i/2;
					y=(m-i)/3;
					break;
				}
			}
			if(x==0&&y==0)
				printf("WA\n");
			else
				printf("%d %d\n",x,y);
		}
	}
}