Is this code correct or not?
Hello @anshulgurawalia i have corrected and commented the mistake :
if you have any doubt you can ask here:
Happy Learning!!
but if i pass
5 15 5 3 the answer shown to us is 3
but we can give scholarship to 4 student ( we take the 6 coupons from the remaining 2 student and give coupon to the 4 th student bcz 1 person require only 5 coupon to get scholarship )
please comment on this!!
@anshulgurawalia dont think like this if you are trying for 4 students then think like this that we have total of 15 coupons now : and if one students is giving the criteria of fail and he will give 3 cuupons and then total we have 18 but for four students we need 20 coupons (5*4) and we dont have this much coupons thats why we are not able to give 4th student the 100%scholarhship.