There are some candies that need to be distributed to some children as fairly as possible (i.e. the variance of result needs to be as small as possible), but I don’t know how to distribute them, so I need your help. Your assignment is to write a function with signature distribute(m, n) in which m represents how many candies there are, while n represents how many children there are. The function should return a List (or Array etc. depending on the specific language) which contains the number of candies each child gains.
The candy can’t be divided into pieces.
The list’s order doesn’t matter.
The case m < 0 is equivalent to m == 0. If n