by@progrunner17
WA
`define EOF 32'hFFFF_FFFF `define STDIN 32'h8000_0000 module cat; integer c,i,d; initial begin c = 48; while (c != `EOF) begin c = $fgetc(`STDIN); d = 0; i = 1; while ( c == 48 || c == 49)begin d = d + (c - 48) * i; i = i * 2; c = $fgetc(`STDIN); end $write("%d\n", d); i = 1; while(d > 0)begin d = d - i; i = i + 1; end if ( d == 0 )begin // $write("%c\n", "0"); end else begin // $write("%c\n", "1"); end end end endmodule
00101101 00000000 10100011 10000001 10101011 01000010 01101011 00111100 01110111 10001000 01000100 01011011 01100110 01001110 00010011 11001011 11001010 00110111 01100011 11010010 11111101 01010011 10010101 00100010 10101011 00101010 00001111 10011001 10010011 00001010 01100001 01101000 11101110 00110000 00100100 01101001 10111110 00011100 11011100 11110100 01111000 01111010 00100100 00000011 11000001 11100111 00000110 10010010 00010101 00000001
180 0 197 129 213 66 214 60 238 17 34 218 102 114 200 211 83 236 198 75 191 202 169 68 213 84 240 153 201 80 134 22 119 12 36 150 125 56 59 47 30 94 36 192 131 231 96 73 168 128 0