Result

AC

Code [DL]

int i,a,b;main(){for(;a<50;a++){for(b=i=0;b<8;b++){i+=getchar()&1;i*=2;}getchar();i/=2;for(b=0;i>0;b++)i-=b;putchar(i<0?48:49);}}

stdin

00101001
10011111
01001001
11111000
01010110
00001010
10101011
00110111
11100111
00000011
01011011
10001000
01011001
10101101
00011011
01000010
11101101
01000010
01000101
00001111
00010001
10101011
11111011
00100100
01111000
10111110
01100001
00000000
11011111
10001001
11111101
00010101
11000000
01001110
01101001
00001110
00000110
10011001
11010010
00101101
00000001
10110101
11100010
01010001
01011100
00011100
01001101
00111010
00000101
01111111

stdout

00000111111100010101010111010011011011111000010000

stderr

/tmp/code.c:1:11: warning: return type defaults to ‘int’ [-Wimplicit-int]
 int i,a,b;main(){for(;a<50;a++){for(b=i=0;b<8;b++){i+=getchar()&1;i*=2;}getchar();i/=2;for(b=0;i>0;b++)i-=b;putchar(i<0?48:49);}}
           ^
/tmp/code.c: In function ‘main’:
/tmp/code.c:1:55: warning: implicit declaration of function ‘getchar’ [-Wimplicit-function-declaration]
 int i,a,b;main(){for(;a<50;a++){for(b=i=0;b<8;b++){i+=getchar()&1;i*=2;}getchar();i/=2;for(b=0;i>0;b++)i-=b;putchar(i<0?48:49);}}
                                                       ^
/tmp/code.c:1:109: warning: implicit declaration of function ‘putchar’ [-Wimplicit-function-declaration]
 int i,a,b;main(){for(;a<50;a++){for(b=i=0;b<8;b++){i+=getchar()&1;i*=2;}getchar();i/=2;for(b=0;i>0;b++)i-=b;putchar(i<0?48:49);}}
                                                                                                             ^

strace