Result

AC

Code [DL]

s;main(j,a){for(;gets(&s);puts(&a))for(s=strtol(&s,&j,2),a=48;--j;)a+=j*j-j==s*2;}

stdin

00000001
00101010
00011100
00100100
01011011
11110111
11111001
00000000
11010010
10101011
11000001
11111101
10111110
11010101
00111010
10000011
00001010
00101101
00001111
00011010
01110101
01001110
11100110
11111011
01111000
00111000
10001000
00000011
01011101
10011100
00001010
10100000
01000010
11100111
01011011
00000110
01010011
11001101
00010101
11100101
00110001
10011001
11100010
01100011
00000101
11101011
00110111
01101001
01101010
11011001

stdout

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

stderr

/tmp/code.c:1:1: warning: data definition has no type or storage class
 s;main(j,a){for(;gets(&s);puts(&a))for(s=strtol(&s,&j,2),a=48;--j;)a+=j*j-j==s*2;}
 ^
/tmp/code.c:1:1: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int]
/tmp/code.c:1:3: warning: return type defaults to ‘int’ [-Wimplicit-int]
 s;main(j,a){for(;gets(&s);puts(&a))for(s=strtol(&s,&j,2),a=48;--j;)a+=j*j-j==s*2;}
   ^
/tmp/code.c: In function ‘main’:
/tmp/code.c:1:3: warning: type of ‘j’ defaults to ‘int’ [-Wimplicit-int]
/tmp/code.c:1:3: warning: type of ‘a’ defaults to ‘int’ [-Wimplicit-int]
/tmp/code.c:1:18: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration]
 s;main(j,a){for(;gets(&s);puts(&a))for(s=strtol(&s,&j,2),a=48;--j;)a+=j*j-j==s*2;}
                  ^
/tmp/code.c:1:27: warning: implicit declaration of function ‘puts’ [-Wimplicit-function-declaration]
 s;main(j,a){for(;gets(&s);puts(&a))for(s=strtol(&s,&j,2),a=48;--j;)a+=j*j-j==s*2;}
                           ^
/tmp/code.c:1:42: warning: implicit declaration of function ‘strtol’ [-Wimplicit-function-declaration]
 s;main(j,a){for(;gets(&s);puts(&a))for(s=strtol(&s,&j,2),a=48;--j;)a+=j*j-j==s*2;}
                                          ^
/tmp/ccHgBpbg.o: In function `main':
code.c:(.text.startup+0x14): warning: the `gets' function is dangerous and should not be used.

strace