Result

WA

Code [DL]

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

stdin

00011111
00111000
00010000
10111010
00110111
11111101
11111111
11000100
00011000
01100110
11100101
00001111
10001100
11100111
00111100
00000001
11000101
00010101
01010000
01000010
10110010
10111110
00000011
01011011
00000110
00111001
00100100
00011100
10101011
10010101
00101101
00001010
00000110
01001011
11111110
11010010
10010011
01111000
11100111
10100000
01101001
10011001
01001110
00000101
10001001
10001000
01010100
10110100
10010001
00000000

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
0

stderr

/tmp/code.c:1:1: warning: data definition has no type or storage class
 s[9];main(j,a,t){for(;gets(s);puts(&a))for(j=t=strtol(s,0,2),a=48;j+1;)a+=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);puts(&a))for(j=t=strtol(s,0,2),a=48;j+1;)a+=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);puts(&a))for(j=t=strtol(s,0,2),a=48;j+1;)a+=j*(--j)==t*2;}
                       ^
/tmp/code.c:1:31: warning: implicit declaration of function ‘puts’ [-Wimplicit-function-declaration]
 s[9];main(j,a,t){for(;gets(s);puts(&a))for(j=t=strtol(s,0,2),a=48;j+1;)a+=j*(--j)==t*2;}
                               ^
/tmp/code.c:1:48: warning: implicit declaration of function ‘strtol’ [-Wimplicit-function-declaration]
 s[9];main(j,a,t){for(;gets(s);puts(&a))for(j=t=strtol(s,0,2),a=48;j+1;)a+=j*(--j)==t*2;}
                                                ^
/tmp/code.c:1:78: warning: operation on ‘j’ may be undefined [-Wsequence-point]
 s[9];main(j,a,t){for(;gets(s);puts(&a))for(j=t=strtol(s,0,2),a=48;j+1;)a+=j*(--j)==t*2;}
                                                                              ^
/tmp/ccf8Be5a.o: In function `main':
code.c:(.text.startup+0x10): warning: the `gets' function is dangerous and should not be used.

strace