Getting wrong Output


I had written this code for implementing the following logic of this question, but it gives us a wrong output. Please help me in identifying my mistakes and correcting it as well!

hi @mvermav19,
actually im not getting this question on the hackerblock platform so I’ve asked the concern person about it, please wait little bit

I had already understood my mistake and rectified it as well.
It’s sorted now.
Thanks a lot!

1 Like

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.