Result

WA

Code [DL]

50.times do
puts (8*STDIN.gets(8).to_i(2)+1)**0.5%2==1?1:0
end

stdin

10101000
10101100
00000110
00101101
10101011
00001101
00100100
00000100
01001110
00111110
11101000
00001010
11100111
00110111
01101001
00000011
01000010
11100101
00000000
11111101
10011001
11101101
01000111
01011011
10110111
01101110
00000001
01111000
10000101
10001000
10111101
01001111
00001100
10000100
11010010
01010111
11110001
00111000
00011100
11011110
10111110
00101011
00001010
10001111
00100011
01010010
00010101
10011000
01000010
00001111

stdout

Error in /volume/CODE:2: undefined method 'to_i' for Nil (compile-time type is (String | Nil)) (did you mean 'to_s'?)

puts (8*STDIN.gets(8).to_i(2)+1)**0.5%2==1?1:0
                      ^~~~

Rerun with --error-trace to show a complete error trace.

stderr

strace