Result

AC

Code [DL]

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

stdin

01000010
00000000
11010111
00001111
11111010
01011001
11110011
00100100
00101101
00011110
10101011
10001111
01001110
01100100
11101100
11111101
00001010
01101011
01100000
10111110
00000110
11100111
00001010
01111000
01011011
10001000
10000111
00000011
00010101
11010010
11011100
00011100
11010010
11111110
00000100
10011001
11001101
10110100
01000001
00110111
00000001
01001001
10011100
00111100
01101001
01010011
01000011
01100011
11000000
00110010

stdout

1
1
0
1
0
0
0
1
1
0
1
0
1
0
0
1
1
0
0
1
1
1
1
1
1
1
0
1
1
1
0
1
1
0
0
1
0
0
0
1
1
0
0
0
1
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(t=strtol(s,0,2),j=a=48;j;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);puts(&a))for(t=strtol(s,0,2),j=a=48;j;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);puts(&a))for(t=strtol(s,0,2),j=a=48;j;j--)a+=j*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(t=strtol(s,0,2),j=a=48;j;j--)a+=j*j-j==t*2;}
                               ^
/tmp/code.c:1:46: warning: implicit declaration of function ‘strtol’ [-Wimplicit-function-declaration]
 s[9];main(j,a,t){for(;gets(s);puts(&a))for(t=strtol(s,0,2),j=a=48;j;j--)a+=j*j-j==t*2;}
                                              ^
/tmp/ccueaNWQ.o: In function `main':
code.c:(.text.startup+0x10): warning: the `gets' function is dangerous and should not be used.

strace