Result

AC

Code [DL]

s[9];main(j,a,t){for(;gets(s);putchar(a+48))for(j=t=strtol(s,a=0,2);j+1;j--)a+=j*j+j==t*2;}

stdin

01010111
01110100
10001001
00101101
00001010
10101011
10110110
01011011
00000111
01101011
00000011
01010010
01110010
11100111
01111000
10100000
00001111
00000110
00110011
11001010
00000000
10111001
11000001
00011010
00111001
10001000
00001111
10010110
10111110
00110111
00000001
11000000
01111010
00101101
10011001
00011100
00010101
00001001
10010001
01000100
11111101
00100100
01101001
10001011
11010010
11010101
10000010
01001110
00010001
01000010

stdout

00011101001001101100100001101110011110001110100101

stderr

/tmp/code.c:1:1: warning: data definition has no type or storage class
 s[9];main(j,a,t){for(;gets(s);putchar(a+48))for(j=t=strtol(s,a=0,2);j+1;j--)a+=j*j+j==t*2;}
 ^
/tmp/code.c:1:1: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int]
/tmp/code.c:1:6: warning: return type defaults to ‘int’ [-Wimplicit-int]
 s[9];main(j,a,t){for(;gets(s);putchar(a+48))for(j=t=strtol(s,a=0,2);j+1;j--)a+=j*j+j==t*2;}
      ^
/tmp/code.c: In function ‘main’:
/tmp/code.c:1:6: warning: type of ‘j’ defaults to ‘int’ [-Wimplicit-int]
/tmp/code.c:1:6: warning: type of ‘a’ defaults to ‘int’ [-Wimplicit-int]
/tmp/code.c:1:6: warning: type of ‘t’ defaults to ‘int’ [-Wimplicit-int]
/tmp/code.c:1:23: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration]
 s[9];main(j,a,t){for(;gets(s);putchar(a+48))for(j=t=strtol(s,a=0,2);j+1;j--)a+=j*j+j==t*2;}
                       ^
/tmp/code.c:1:31: warning: implicit declaration of function ‘putchar’ [-Wimplicit-function-declaration]
 s[9];main(j,a,t){for(;gets(s);putchar(a+48))for(j=t=strtol(s,a=0,2);j+1;j--)a+=j*j+j==t*2;}
                               ^
/tmp/code.c:1:53: warning: implicit declaration of function ‘strtol’ [-Wimplicit-function-declaration]
 s[9];main(j,a,t){for(;gets(s);putchar(a+48))for(j=t=strtol(s,a=0,2);j+1;j--)a+=j*j+j==t*2;}
                                                     ^
/tmp/ccNUckdp.o: In function `main':
code.c:(.text.startup+0xc): warning: the `gets' function is dangerous and should not be used.

strace