Logic problem as suggested by u

sir,As u have suggested that use mid*x=[M * (N-mid) * Y]
but what if mid=6,x=2,M=10,N=6 and Y=2
If i use this logic it will give the scholarship to only 5 students but actually it should give to 6 students becoz we have extra 2 coupens also there which is provided by ‘Y’

in logic it is ‘<=’ sorry i have mention ‘=’ only

Hello @n.nishchaya2000,

  1. incorrect equation:
    midx=[M * (N-mid) * Y]
    Correction:
    mid
    x<=[M + (N-mid) * Y]
    Reason:
    The total possible amount we can generate from N students is M(starting points) + (N-mid)(remaining students) * Y(the penalty amount).

  2. No, it should provide scholarship to only 5 students.
    If you are considering Y=2 that means you charged a penalty from the 6th students. So, you cannot give scholarship to him now. Thus, you can only give the scholarship to five students.

Hope, this would help.
Give a like if you are satisfied.