Skip to main content
4 of 4
deleted 101 characters in body
Ethan
  • 455
  • 2
  • 9

PHP, 43 42 bytes

<?while($a=$a?rand(0,$a-1):$argn)echo$a?>0

To run it:

echo '<input>' | php -nF <filename>

Or Try it online!

Example output:

10019128410

-1 byte thanks to Titus's suggestion.

Ethan
  • 455
  • 2
  • 9