Given a positive integer n, randomly output n non negative integers that sum to one hundred. n will be at most 200. The output should be present as a list of integers (not sorted).
Your random sample should be uniformly sampled from all lists of n non negative integers that sum to one hundred.
Your code should run in a reasonable amount of time (e.g. should terminate on TIO) for n less than a 200 . This is just to prevent brute force solutions.
Examples
If n=1 the code should always output 100
If n=2 the code should output 100,0 or 99,1 or 98,2 or 97,3 ... or 2,98 or 1,99 or 0,100 with equal probability. There are 101 different possible outputs in this case.
If n>100 then some of the values in the output will necessarily be 0.
n
?` if n=1 the output would be just 100, if n=2 it would be 2 numbers. Up to n=100, or n=1000 where most of the ouput list will be zeroes. Should output be presented as an unordered list, or sorted? Some examples would be useful. \$\endgroup\$