Result

AC

Code [DL]

module a;integer i,j,x,c;initial begin for(i=0;i<50;i=i+1)begin c=$fscanf(32'h80000000,"%b",x);for(j=0;j<=x;j=j+1)begin c=c+(j*(j+1)/2==x);end $write("%d",c-1);end end endmodule

stdin

11001010
00000000
00000011
01010001
01011011
00001111
10101010
11110010
01001110
01111111
00001010
01101111
10011011
11100111
10001000
10101011
00100100
00001111
00011100
01011110
11001000
01100101
01101110
00010101
10000001
10111110
00110111
11010000
00001000
00000110
10011001
00111100
11111101
11100001
01000010
01111101
10001000
00101101
01111010
10100001
11101010
00000001
01101001
11011011
01111000
01001001
01110001
11010010
10100110
01010110

stdout

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

stderr

strace