Can someone help me to figure out for which test case this gives WA

This Question is from foundation CCDSAP from binary search:

My solution:
https://www.codechef.com/viewsolution/22866957

//