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

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