简单题,直接推导一下就好
#include<cmath>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
typedef long long LL;
const int maxn = 1e7 + 5;
int T, n, m;
int main()
{
scanf("%d", &T);
while (T--)
{
scanf("%d", &n);
printf("%d\n", n & 1);
}
return 0;
}