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: CT12813091281
In contest: 1281

#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
int main(void){
	int n,t,ss,s,sss;
	scanf("%d",&t);
	while(t--){
		scanf("%d",&n);
		s=n/3;
		ss=n%3;
		sss=(s*2+ss)%3;
		printf("%d\n",sss);
	}
}