/* *********************************************** Author :kuangbin Created Time :2015/12/5 19:03:19 File Name :F:\ACM\2015ACM\BestCoder\BC65\B.cpp ************************************************ */ #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { //freopen("in.txt","r",stdin); //freopen("out.txt","w",stdout); int T; int n; scanf("%d",&T); while(T--) { scanf("%d",&n); if(n%2 == 1)printf("1\n"); else printf("0\n"); } return 0; }