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

#include<stdio.h>
#include<string.h>
#include<stdlib.h>

struct name{
	char a[100];
	int b;
	int c;
	int d;
};

int comp(const void *p,const void *q){
	return ((struct name * )q)->d - ((struct name * )p)->d;
}
int comp2(const void *p,const void *q){
	return ((struct name * )p)->b - ((struct name * )q)->b;
}

int main(void){
	int t,i,j,p,q,x,y,k,l;
	int n,m;
	int a,b;
	char c;
	struct name g[200];
	scanf("%d",&t);
	while(t--){
		scanf("%d",&n);
		m=n%3;
		if(n==1||n==0) printf("WA\n");
		else if(m==0) printf("%d %d\n",0,n/3);
		else if(m==1) printf("%d %d\n",2,n/3-1);
		else if(m==2) printf("%d %d\n",1,n/3);
	}
	
	return 0;
}