Result

WA

Code [DL]

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

stdin

01101001
01010010
11101000
11001100
00010111
01000010
01111000
11111101
00010101
11001110
00101101
10000101
11100111
00000000
11000011
00111001
01011001
01101001
10001000
00110111
01000110
11010111
10110000
00000011
00000111
11000110
00100100
10111001
00011100
10000010
10101011
11011100
11000010
10011001
10111100
11100111
01111100
00001111
01010110
01011011
00001010
10111110
01000111
11100001
11010010
00000110
01001110
01101011
00000001
10101001

stdout

false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false

stderr

strace