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

01110000
00110010
01001100
11111101
00001111
11111011
10101011
00100011
11000101
11010010
00110011
00011101
01101001
00001000
00101101
00000110
11111001
10011000
00010101
00011100
01111100
11010010
01000010
01001110
10101111
10010001
10010111
11110001
00110111
11100111
01010010
10110001
11011010
10001000
10010010
00000001
10011001
00001010
00101000
11100010
00001111
01111000
00000000
01011011
00000011
10111110
10100010
00100100
11011111
01001011

stdout

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

stderr

strace