Result

AC

Code [DL]

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

stdin

01001110
00110111
01110101
00100101
10001000
11100111
01011011
00010110
00001010
11100010
00100100
11111001
11011011
10001011
11010010
01001101
00111010
00011100
00010001
10011111
00111110
00000000
01000110
11001110
01001110
00011100
10011101
10000110
00101111
10010111
10010110
00010101
11111101
00001111
00000011
01000010
00000110
10111110
10011001
11111011
00101101
00000001
01101001
01111000
01001100
00110011
01001011
11101101
10101011
11111110

stdout

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

stderr

strace