Result

WA

Code [DL]

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

stdin

11100111
01000010
11010101
00100100
00101101
10100001
01101001
10111001
11111101
00000011
00010110
00100100
00110111
01001110
11101001
00000110
11101011
01111000
11011100
00001111
00100011
11111010
11010010
10000000
11001110
00110010
00011100
10001000
00010000
11110101
11101101
00100110
01000111
00000000
11110001
01101111
00010101
10101001
00000001
01011011
11111110
00001010
01000010
10010010
10111110
10011001
01111110
10101011
01100111
11110010

stdout

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

stderr

strace