6 ms·
There can be many ways to do so, one of them is already described by cperciva. Another can be, a) All Integers n1 = n2 = n3 =.....= n[m-1] = int(n / m) and n
by VarunGupta 18y ago
There can be many ways to do so, one of them is already described by cperciva.
Another can be,
a) All Integers
n1 = n2 = n3 =.....= n[m-1] = int(n / m) and
nm = n - (n1 + n2 + n3 +.....+ n[m-1])
b) Floats
n1 = n2 = n3 =.....= n[m] = n / m
I feel the problem can be more serious if you want the parts to be in certain fashion or distribution.