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: 5ms
Memory: 1120kB
Author: CT12810481281
In contest: 1281

#include<stdio.h>
#include<string.h>
int main(void)
{
	int t,i,n,j,sum,m;
	scanf("%d",&t);
	for(i=0;i<t;i++)
	{
		scanf("%d",&n);m=0;
		for(j=1;j<=n;j++)
		{
			if(j%3!=0)m++;
		}
		sum=m%3;
		printf("%d\n",sum);
	}
}