Please help me find why this code is giving WA

problem:Problem - C - Codeforces
my solution:JXskwA - Online Java Compiler & Debugging Tool - Ideone.com
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.