Result

AC

Code [DL]

while 1:print+((1+8*int(raw_input(),2))**.5%2==1)

stdin

01110001
00101100
10111011
11010010
10101011
00011100
11111101
01000110
00101101
01011011
01101010
01000010
00000011
10010111
11110010
00111001
00010101
10010011
10001000
00110010
11111000
00000000
00111010
01111000
01101011
00000000
11010111
11110111
10100010
11010010
00110111
00100100
10011001
00000001
11101110
10010010
11111001
01101001
10111110
01001110
11100111
01010100
01000100
00000110
01000101
11110101
00001010
10011111
00001111
01011101

stdout

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

stderr

Traceback (most recent call last):
  File "/volume/CODE", line 1, in <module>
    while 1:print+((1+8*int(raw_input(),2))**.5%2==1)
EOFError: EOF when reading a line

strace