I tried solving the problem but its showingwrong output

please help me to correct my logic last TA asked me to see editorial which i dont want please correct my logic where is wrong

Hey @chemant077
I see you received a score 100 today
Do you still need help ?
If not please close this doubt

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.