Unlock problem-Not getting correct output

Why am I not getting the correct output, even after using the editorial code ? The link of the code:

@Coding_Mamba after you unlock the editorial then you get 0 score after submitting the solution. Perhaps that is the reason for no score.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.