Result

WA

Code [DL]

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

stdin

11111101
01001110
00000110
11101110
00101101
10000110
10101011
10001110
00000001
00000011
10010001
11100111
11100001
00100101
10111110
11111100
11010010
00100011
00001010
00110111
11001001
10001011
11101101
11000111
01000010
10011110
10001000
01000101
01100010
11110000
00001111
01111000
01011011
10111110
00000000
01101001
11011011
00011100
10000100
10011100
00100100
10111001
00010101
10111101
00111000
10011001
11010001
11100110
10111110
11101011

stdout

ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2ERROR: /volume/CODE:1: invalid file descriptor (0x0) given to $fscanf.
         -2

stderr

strace