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: 3ms
Memory: 1092kB
Author: 2016210402101
In contest: 1084

#include<stdio.h>
#include<string.h>
struct name
{
	char a[22];
	int b;
	int c;
	int d;
};
int main()
{
	int t,a,x,y;
	scanf("%d",&t);
	for(int i=0;i<t;i++)
	{
		scanf("%d",&a);
		if(a==1)
			printf("WA\n");
		else if(a==0)
			printf("0 0\n");
		else
		{
			for(x=0;x<a;++x)
			{
				for(y=0;y<a;++y)
				{
					if(2*x+3*y==a)
						break;
				}
				if(2*x+3*y==a)
						break;
			}
			printf("%d %d\n",x,y);
		}

	}
}