Result

AC

Code [DL]

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

stdin

01001110
10001000
00100100
11010011
10010110
00010010
00001010
10111110
01000000
00000011
11000000
11000111
00000110
00010101
01000011
10100111
01111011
11110000
10100001
00000000
01011100
11000011
11100111
10101011
11111111
01111000
01000010
00000001
00011100
00010001
00101101
10011111
10001000
11010010
00010111
10011000
11111110
10001011
01101011
01101001
00001111
10011001
00001000
00000001
01101110
11111101
01000001
00110111
01011011
01100011

stdout

1
1
1
0
0
0
1
1
0
1
0
0
1
1
0
0
0
0
0
1
0
0
1
1
0
1
1
1
1
0
1
0
1
1
0
0
0
0
0
1
1
1
0
1
0
1
0
1
1
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;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(j=t=strtol(s,0,2),a=48;j+1;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(j=t=strtol(s,0,2),a=48;j+1;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(j=t=strtol(s,0,2),a=48;j+1;j--)a+=j*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;j--)a+=j*j+j==t*2;}
                                                ^
/tmp/ccP3dU2H.o: In function `main':
code.c:(.text.startup+0x10): warning: the `gets' function is dangerous and should not be used.

strace