Hope everyone enjoyed their weekend! Today's problem comes from @quentinms. Thanks for the submission.
How to randomly pick k numbers between 0 and n such that their sum is n?
Hope everyone enjoyed their weekend! Today's problem comes from @quentinms. Thanks for the submission.
How to randomly pick k numbers between 0 and n such that their sum is n?
Permalink: http://problemotd.com/problem/random-sum/
Content curated by @MaxBurstein
Comments:
Anonymous - 9 years, 8 months ago
cool
reply permalink
Driphter - 9 years, 8 months ago
Clojure!
I wasn't sure if the "between" in the requirements was supposed to be inclusive or exclusive, so I did both.
reply permalink
Anonymous - 9 years, 8 months ago
Using HTML + JS (with jquery) https://jsfiddle.net/k0f8k3va/1/
reply permalink
David - 9 years, 4 months ago
reply permalink