https://www.codechef.com/ENAU2020/problems/ECAUG205

anyone can help me in this question why we use the binary search in this question and Is there any other approach for this ?
thank you in advance :slight_smile: