Result

WA

Code [DL]

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

stdin

00000110
00001110
00111001
11110110
10001000
01000101
11100111
01011011
10100011
00100100
00101101
01111010
01011110
00111101
10111001
00000011
11111101
01000010
00000100
00010111
11011100
00001011
10100000
11010010
00110111
01110100
10001000
01000110
10101100
10011001
10111110
00000011
10011111
01101001
01011001
01100011
10101011
00010101
00001111
00000001
10001111
10110111
00011100
01111000
11101111
11111111
01001110
00000000
00101110
00001010

stdout

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
�
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==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==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==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==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==s*2;}
                                          ^
/tmp/code.c:1:71: warning: operation on ‘j’ may be undefined [-Wsequence-point]
 s;main(j,a){for(;gets(&s);puts(&a))for(s=strtol(&s,&j,2),a=48;j;)a+=j*--j==s*2;}
                                                                       ^
/tmp/cc4KKvWw.o: In function `main':
code.c:(.text.startup+0x14): warning: the `gets' function is dangerous and should not be used.

strace