Domanda di colloquio di DXC Technology

Solve the code as per the given inputs and outputs.