Renesas Interview Question

They asked verilog codes starting from the interview, it was fine and the difficulty kept increasing