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: always_sunlit
In contest: 1084

#include<stdio.h>
int main (void)
{
	int T,N,x,y,m;
	scanf("%d",&T);
	while(T--){
		scanf("%d",&N);
		for(x = 0;x < N;++x){
			m = N - 2*x;
			y = m/3;
			if(3*y + 2*x == N)
				break;}
		if(3*y + 2*x == N)
			printf("%d %d\n",x,y);
		else
			printf("WA\n");}
	return 0;
}