Result

WA

Code [DL]

while c=gets().to_i
b=0
i=0
while i<8
r=c%10
c/=10
b+=r*(2**i)
i+=1
end
i=1
while b>0
b-=i
i+=1
end
if b==0
puts(1)
else
puts(0)
end
end

stdin

10000010
11111101
00001111
00110111
10010111
10001011
01001000
01101001
00000110
00010101
01111000
01011011
00000001
11010010
10111110
10111101
01001110
01101010
00000000
10001001
00011110
11010111
00110110
11010000
11100111
00101000
00101101
10011001
10111100
01011000
01000010
00011100
00000011
01001011
10001000
00010011
01000011
00101100
00111100
00001010
01111010
11110010
10101011
01101110
00100100
11100111
01101000
10101011
00000111
11011010

stdout

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

while c=gets().to_i
               ^~~~

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

stderr

strace