Result

WA

Code [DL]

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

stdin

00110100
01111011
11110001
11010000
10011001
10001000
00000011
10000010
01011011
10100101
00010010
00001010
00011100
00010101
10100100
00001111
00111011
00000110
01000001
11010111
11000100
00101101
01001001
00000000
00000001
01001010
00110111
01001110
01101001
11001110
01111101
00100100
11011101
00100101
01111000
01000010
10010111
11111101
11010010
01010010
01100000
11101101
10111110
11100111
10101011
11100111
01010000
11001001
00011110
10101011

stdout

stderr

/tmp/code.c:1:11: warning: return type defaults to ‘int’ [-Wimplicit-int]
 char s[9];main(j,a,t){for(;gets(s);puts(a)){t=strtol(s,s,2);a=0;for(j=t;j--;)a+=j*(j+1)==t*2;}}
           ^
/tmp/code.c: In function ‘main’:
/tmp/code.c:1:11: warning: type of ‘j’ defaults to ‘int’ [-Wimplicit-int]
/tmp/code.c:1:11: warning: type of ‘a’ defaults to ‘int’ [-Wimplicit-int]
/tmp/code.c:1:11: warning: type of ‘t’ defaults to ‘int’ [-Wimplicit-int]
/tmp/code.c:1:28: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration]
 char s[9];main(j,a,t){for(;gets(s);puts(a)){t=strtol(s,s,2);a=0;for(j=t;j--;)a+=j*(j+1)==t*2;}}
                            ^
/tmp/code.c:1:36: warning: implicit declaration of function ‘puts’ [-Wimplicit-function-declaration]
 char s[9];main(j,a,t){for(;gets(s);puts(a)){t=strtol(s,s,2);a=0;for(j=t;j--;)a+=j*(j+1)==t*2;}}
                                    ^
/tmp/code.c:1:47: warning: implicit declaration of function ‘strtol’ [-Wimplicit-function-declaration]
 char s[9];main(j,a,t){for(;gets(s);puts(a)){t=strtol(s,s,2);a=0;for(j=t;j--;)a+=j*(j+1)==t*2;}}
                                               ^
/tmp/cc0okRjQ.o: In function `main':
code.c:(.text.startup+0xc): warning: the `gets' function is dangerous and should not be used.
/home/esolang/bin/c-gcc: line 6:    13 Done                    cat -
        14 Segmentation fault      (core dumped) | /tmp/code

strace