Start: Jul, 05, 2019 08:40:00
2019年度暑期短学期达标测试
End: Jul, 05, 2019 11:40:00
Time elapsed:
Time remaining:

Problem_ID: I
Result: Accepted
Time: 3ms
Memory: 1120kB
Author: CT12810031281
In contest: 1281

#include<stdio.h>
int main(void){
	int t,n,m;
	t<=5;
	scanf("%d",&t);
	while(t--){
		scanf("%d",&n);
		if(n>=10)
		n=n%9;
		if(n==1||n==6||n==5)
			m=1;
		if(n==2||n==3||n==7)
			m=2;
		if(n==4||n==8||n==9)
			m=0;
		printf("%d\n",m);
	}
	return 0;
}