Why is this solution not working for this problem?

Why is this solution not working for this problem?
https://codeforces.com/problemset/problem/404/A

Hello @cbcao263,

Your logic for this question might be incorrect.

Refer to the following code:

Hope this would help.

Hey @aman212yadav,

You might have responded to the wrong thread.

@S18ML0016
i dont know bhaiya, i am clicking on this doubt and it is redirecting me current page
image

@aman212yadav,

Report this at the mail.

@S18ML0016
i think it was my mistake only :sweat_smile::sweat_smile: ,
he has created two different thread for the same doubt ,and i have replied to wrong thread.
extremely sorry for this

Np buddy @aman212yadav.

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.