Result

WA

Code [DL]

while a=gets()
b=a.to_i 2
i=1
while b>0
b-=i
i+=1
end
puts b==0 ? 0:1
end

stdin

00110111
10111010
01001110
01111010
00111000
10000111
10110011
10001010
00000110
01010111
01101101
11100111
01111110
00001111
01101001
00111110
10101011
00100100
10011001
00011001
11010001
10011100
01001111
00100111
01001101
00011101
00101101
01001000
11111101
00010001
00010101
11101110
00100100
10010100
11010010
01011011
10010101
10111110
00000000
01111000
00010000
00000001
00000011
11001011
00100000
01000010
00011100
11111101
10001000
00001010

stdout

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

stderr

strace