Smart Keypad - Advanced

Incomplete problem statement is given

Hey Ashutosh, problem statement is complete if still you are not able to understand the question you can check the explanation given for output of sample input.