Please check my code.Why is the need of binary search in this problem ,if i am doing it without applying binary search then it is not accepted.?
Coding Blocks Scholarship problem
Hey Vijay, using binary search is just an another approach of solving this problem, its not manditory to use binary search. this problem can be solved without using binary search also.
Your given code is not working because your logic is not correct and read the constraints carefully, as the numbers are large, So you are supposed to use long long int instead of int data type.