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

01111000
00001111
01000111
01111011
00011100
10101011
00000011
00010110
11111011
01001110
11111000
01011011
01101111
11100111
11111101
10111110
00000000
11100011
10010000
01100100
00011010
00000110
10011111
00100100
11110000
00000001
10011001
00101101
11010010
00110001
10100001
10001010
01110001
01100001
00001010
10001000
10011010
00111011
00111111
00100001
00000110
11011011
01101001
11111010
00110111
01011111
01111000
10001011
01000010
00010101

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