# [Charcoal], 10 bytes FAFι⊞υιI‽υ [Try it online!][TIO-lm345kyi] Link is to verbose version of code. Explanation: FA Loop over the input numbers. Fι⊞υι Push each number that many times to the predefined empty list. I‽υ Output a random number from that list. 8 bytes using the newer version of Charcoal on ATO: I‽ΣEAEιι [Attempt This Online!][ATO-lm345kyi] Link is to verbose version of code. Explanation: A Input list E Map over elements ι Current element E Map over implicit range ι Outer element Σ Flatten ‽ Random element I Cast to string Implicitly print A port of @Arnauld's JavaScript answer in straight succinct Charcoal is only 6 bytes: I⌈∨Φθ‽ [Try it online!][TIO-lm3yuzbp] Explanation: θ Input list Φ Filtered by ‽ Random coin flip ∨ If empty then implicitly use input list ⌈ Take the maximum I Cast to string Implicitly print [Charcoal]: https://github.com/somebody1234/Charcoal [TIO-lm345kyi]: https://tio.run/##S85ILErOT8z5/z8tv0hBwzOvoLREQ1NTAczL1FQIKC3O0CjVUcjUtOYKKMrMK9FwTiwu0QhKzEvJz9Uo1dTUtP7/PzraUEfBSEfBWEfBJDb2v25ZDgA "Charcoal – Try It Online" [ATO-lm345kyi]: https://ato.pxeger.com/run?1=m70iOSOxKDk_MWfBgqWlJWm6FjeNAooy80o0nBOLSzSCEvNS8nM1gktzNXwTCzQ88wpKSzQ0dRRAnEwdhUxNMLBeUpyUXAzVvzxaSbcsRyl2XXS0oY6CkY6CsY6CSWwsRBIA "Charcoal – Attempt This Online" [TIO-lm3yuzbp]: https://tio.run/##ASoA1f9jaGFyY29hbP//77yp4oyI4oiozqbOuOKAvf//W1sxLCAyLCAzLCA0XV0 "Charcoal – Try It Online"