I have some weird numbers such as 19 or 23. These two will need to be separated into 5 lists, such that the sum of the 5 lists will be 19. In other words, 3.8 in each list as 19/5 = 3.8. However the issue is that I can’t have decimals, I want rounded numbers. Is there any way that it would round the numbers accordingly, placing 4, 4, 3, 4, 4 into the lists rather than 3.8 five times?
Even more, some aren’t separated into 5 different numbers. Some might be something like 77/12, thus being separated into 12 diff. lists with either the number 6 or 7 in each, that ends up adding to 77.
Any idea how I could approach this problem?
Thanks!
Original version: