Result

AC

Code [DL]

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

stdin

10101000
00001111
10001111
01000010
11100000
01010110
00110111
10011001
00011001
10010100
00100100
00011100
00000000
11101110
10110100
00000100
10011010
11101100
01011011
11011101
00110000
00001010
01001110
11100100
01110100
10101011
01111000
10100011
11111101
01101001
00101101
11010111
10111110
01101110
10110000
11101101
00100100
00010101
11010010
00010111
01011011
00000110
10001000
00000001
10110011
00011101
00001110
11100111
00000011
01011010

stdout

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

stderr

/tmp/code.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 main(j,s,a,t){for(;gets(&s);puts(&a))for(t=strtol(&s,0,2),j=a=48;--j;)a+=j*j-j==t*2;}
 ^
/tmp/code.c: In function ‘main’:
/tmp/code.c:1:1: warning: type of ‘j’ defaults to ‘int’ [-Wimplicit-int]
/tmp/code.c:1:1: warning: type of ‘s’ defaults to ‘int’ [-Wimplicit-int]
/tmp/code.c:1:1: warning: type of ‘a’ defaults to ‘int’ [-Wimplicit-int]
/tmp/code.c:1:1: warning: type of ‘t’ defaults to ‘int’ [-Wimplicit-int]
/tmp/code.c:1:20: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration]
 main(j,s,a,t){for(;gets(&s);puts(&a))for(t=strtol(&s,0,2),j=a=48;--j;)a+=j*j-j==t*2;}
                    ^
/tmp/code.c:1:29: warning: implicit declaration of function ‘puts’ [-Wimplicit-function-declaration]
 main(j,s,a,t){for(;gets(&s);puts(&a))for(t=strtol(&s,0,2),j=a=48;--j;)a+=j*j-j==t*2;}
                             ^
/tmp/code.c:1:44: warning: implicit declaration of function ‘strtol’ [-Wimplicit-function-declaration]
 main(j,s,a,t){for(;gets(&s);puts(&a))for(t=strtol(&s,0,2),j=a=48;--j;)a+=j*j-j==t*2;}
                                            ^
/tmp/ccvRn3jX.o: In function `main':
code.c:(.text.startup+0x14): warning: the `gets' function is dangerous and should not be used.

strace