Result

AC

Code [DL]

begin integer a,b,r,i;while i<50do begin a:=inint;b:=0;r:=1;while a>0do begin b:=b+r*(a-a//2*2);r:=r*2;a:=a/10;end;a:=sqrt(b*8+1);r:=0;if a*a=b*8+1then r:=1;outint(r,0);i:=i+1;end;end

stdin

10010111
01011111
10101011
10011001
01101001
01111010
11100111
10001101
00000000
00010000
00001111
01011011
11000101
00101101
11011100
11100101
00000110
00110100
00110000
11110001
00110111
01010101
11110101
10111101
00101001
00010101
10001000
11010010
01110110
00110111
01001110
00000000
00100110
11111101
00110011
11111100
01011001
10111110
00011101
00110001
00111010
01000010
00000011
00001010
01111000
00001001
00100100
00000001
10111000
00011100

stdout

00111010101101001000100001110111010001000111101101

stderr

Compiling /tmp/code.sim:
gcc -g -O2 -c code.c
code.c: In function ‘main’:
code.c:115:136: warning: implicit declaration of function ‘exit’ [-Wimplicit-function-declaration]
 int main(int __argc, char *__argv[]){__progname= __argv[0];goto __sw;__l0:__rstart(__argc,__argv);goto __start;__l1:__slutt:__rslutt();exit(0);__start:__curent_map=__mapmain;
                                                                                                                                        ^
code.c:115:136: warning: incompatible implicit declaration of built-in function ‘exit’
code.c:115:136: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
/tmp/code.sim:1:950: warning: implicit declaration of function ‘__rbe’ [-Wimplicit-function-declaration]
/tmp/code.sim: In function ‘__init’:
/tmp/code.sim:4:19: warning: implicit declaration of function ‘__init_FILE’ [-Wimplicit-function-declaration]
/tmp/code.sim: At top level:
/tmp/code.sim:5:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
/tmp/code.sim:13:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
gcc -g -O2 -o /tmp/code code.o -L/usr/local/lib -lcim