Result

AC

Code [DL]

50.times{a=(((8*gets.to_i(2)+1)**(0.5)-1)/2);p(a.to_i==a ?1:0)}

stdin

00000001
00111001
01001110
01010000
10001010
11010101
11011101
01011111
11110001
00010101
10011001
00001111
10111110
01101001
01111000
11100111
00001010
01000010
10110101
01010010
10111110
00011100
10001000
01110010
00000011
11000101
10111100
10010000
11010111
01111000
00100110
10101011
11001010
01101101
00101101
11111101
00000000
01011011
10000100
00100100
11010100
11010010
00000110
00101010
00100010
10010100
00110111
10001011
10011011
01101100

stdout

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

stderr

strace