Test case fail win cb
Your logic is wrong.As no of coupons can be more than (M+Y).
Y is the number of coupons we will get from each student who performed badly in the test.So,if more than one student performed badly in the test then coupons will surely be more than (M+Y).
This is a standard binary search problem.Try to maximise the number of students who can take the scholarship.
If you want i can send my code:)
@Mohitpandey29 here is y depends upon the student who badly perform in the test how ?.. I am thinking right now we have m coupons and y we have some extra and make them the total sum of coups .
can u explain the problem how we are getting the y no of student if the student badly perform in the test