Result

AC

Code [DL]

import std.stdio;import std.conv;import std.math;void main(){for(int i=50;i--;){writeln(sqrt(to!int(readln()[0..8],2)*8+1.)%2==1?1:0);}}

stdin

10101011
10010001
01101001
01000100
00111011
10111010
00110111
01010101
01001011
11000100
00100100
11010000
00101101
11111111
11100111
00010101
11111101
11001011
10011100
01111111
11001101
11010010
11110010
01001110
10101011
00000001
10001000
00001010
01000000
11101101
01110010
10110001
00010010
00001001
00000011
01011011
00000000
11011100
00000110
10111110
01111000
00010101
01011001
00001111
00011100
00100011
01000010
00101000
10011001
10111000

stdout

1
0
1
0
0
0
1
0
0
0
1
0
1
0
1
1
1
0
0
0
0
1
0
1
1
1
1
1
0
0
0
0
0
0
1
1
1
0
1
1
1
1
0
1
1
0
1
0
1
0

stderr

strace