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;j--)a+=j*j+j==t*2;}

stdin

01001110
11001110
11111101
10101011
01000010
01011000
01011111
10000011
10111101
10000101
11101000
00001111
01101001
11011101
00111111
11101101
00000011
00101001
10011001
00011100
00110111
00101101
00100100
10100111
00010101
00000001
11111011
10001000
10101111
10100100
00000000
00000110
00101101
01010110
01111000
11000111
01100110
10100000
01010100
00001010
10111110
11100111
11110010
11010010
00100100
01011011
01011100
01011110
11010101
11001010

stdout

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

strace