Binary search used. Still getting TLE in couple of test cases

Hello @gautam74 I think it should work.
Try to submit after declaring the data type as long long int.

Changed the data type to long long int, but still test case 0 and test case 1 failed. The error is not Wrong answer but rather TLE.

@gautam74 this code is passing all the test cases: https://ide.codingblocks.com/s/427884
you can try submitting it here:https://hack.codingblocks.com/app/practice/1/199/problem

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.