mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
28 lines
484 B
C++
28 lines
484 B
C++
|
#include <stdio.h>
|
||
|
int main()
|
||
|
{
|
||
|
int n,k,i,num;
|
||
|
scanf("%d",&n);
|
||
|
while(n--)
|
||
|
{
|
||
|
num=0;
|
||
|
scanf("%d",&k);
|
||
|
for(i=1;i<=k;i++)
|
||
|
{
|
||
|
if(i*i<=k)
|
||
|
num++;
|
||
|
else
|
||
|
break;
|
||
|
}
|
||
|
for(i=1;i<=k;i++)
|
||
|
{
|
||
|
if(2*i*i<=k)
|
||
|
num++;
|
||
|
else
|
||
|
break;
|
||
|
}
|
||
|
printf("%d\n",num%2);
|
||
|
}
|
||
|
return 0;
|
||
|
}
|