Codeforces contest doubt

https://codeforces.com/gym/320678/problem/C

find the bug in above pls!

hello @prerak_semwal
same issue with this question.

ping me back once the contest is over

@aman212yadav

question :-

your logic seems correct for this problem, what issue u r facing

@aman212yadav
I don’t know it gave wrong answer on test 7

there were correct submissions in contest this meant I am missing something !

check that test case. as per the problem statement ur code is correct

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.