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

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