Result

WA

Code [DL]

while a=gets()
b=a.to_i 2
i=1
while b>0
b-=i
i+=1
end
p b&1
end

stdin

00011100
01001111
10111110
00000011
10110011
01000010
01111100
00000110
11101011
01001110
10111110
00100101
00000000
00000001
00000100
11000001
00101101
10111011
10001000
01110010
01111000
11100010
11011111
00110111
00100100
01101011
11100111
11010010
10001100
01101000
10000011
00001010
00110110
01100100
11001011
01000011
10011001
11001101
00100100
01000100
01101001
11001110
10101001
00111011
01011011
10101011
11111101
00001111
00010101
10000101

stdout

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

stderr

strace