Hello. A question. Not programming - just math. Task: there are n number of people. There is a total cash fund of $, which is divided by the number of people $ / n. For each person, a set of criteria (0.988, 0.554) is set (the sum of the coefficients is not 100%). Question: how among all people to divide money without balance depending on the coefficients?

    1 answer 1

    Oh, it can be done quite simply =)

    If we denote the coefficients as a1, a2, ..., an, and the budget is S, then the i-th person will get


    part of all the money =)