Why is this code not working?

Why is this code not working?

http://codeforces.com/problemset/problem/467/B

Hey I think you posted some other question.
Question & code does not match with each other.

@cbcao263 just refer cf editorial and upon submitting check which case you are getting wrong for and dry run

Sorry
It’s my mistake

The Question is
http://codeforces.com/problemset/problem/492/B

Can You Please tell Now @Kartikkhariwal1

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.