Please help me find why this code is giving WA

problem:https://codeforces.com/contest/52/problem/C
my solution:https://ideone.com/JXskwA
Please help as I am getting WA in 6th test case and I am unable to find it.

can somebody please provide some help.

@aryaman_arora :frowning_face:

It might be better to ask in this thread, instead :slight_smile:

1 Like

https://www.codechef.com/viewsolution/28422827
Please let me know where iā€™m wrong.