Dear friend,
let me simplify, suppose i want distribute 15 cookies into the children of GroupA and any child can be given max 6 cookies. Thus upon distribution 2 children will have 6,6 cookies and one will have 3. thus no matter what quantities of cookies i have, it should be automatically...