Result

AC

Code [DL]

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

stdin

11000101
01111000
10100101
11111101
10101100
01000000
10011011
00110111
11011000
00010000
00011101
10000101
01011000
01101001
01001110
00011100
11010010
10100110
00101101
10100011
00011100
01000010
00000110
11001010
10101011
11100111
01111100
10000011
00001010
10111000
01101110
10100010
01011011
00000000
11100111
11001100
10001000
00010101
01010100
11101100
11101111
00000001
00000011
10111110
00001111
11111000
01110100
00010001
00100100
10011001

stdout

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

stderr

strace