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

#include <stdio.h>

int main()
{
	int a,b,t,n,i,j;
	scanf("%d",&t);
	while(t--){
		scanf("%d",&n);
		if(n<2)printf("WA");
		else if(n%3==0)printf("0 %d",n/3);
		else if(n%3==1)printf("2 %d",(n-4)/3);
		else printf("1 %d",n/3);
		printf("\n");
	}
	return 0;
}