Timeline for Randomizing until 0
Current License: CC BY-SA 4.0
15 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 10, 2018 at 13:45 | comment | added | djhurio |
39 bytes: n=scan();while(print(n))n=sample(n,1)-1
|
|
Jul 9, 2018 at 22:58 | comment | added | JayCe | Just back from vacation... same bytecount, recursive tio | |
Jul 9, 2018 at 18:15 | history | edited | ngm | CC BY-SA 4.0 |
deleted 55 characters in body
|
Jul 9, 2018 at 18:09 | comment | added | Giuseppe | btw, congrats on 1K! :-) | |
Jul 9, 2018 at 18:07 | comment | added | digEmAll | I forgot to remove the curly brackets, so you can save 2 more bytes ;) Try it online! | |
Jul 9, 2018 at 18:05 | history | edited | ngm | CC BY-SA 4.0 |
added 34 characters in body
|
Jul 9, 2018 at 17:59 | comment | added | digEmAll | Sorry, am I missing something or this is valid ? Try it online! | |
Jul 9, 2018 at 14:49 | history | edited | ngm | CC BY-SA 4.0 |
deleted 13 characters in body
|
Jul 9, 2018 at 14:04 | comment | added | JAD |
Also 56 bytes: k=scan();while(x<-sample(1:k-1,1))k=c(x,k);cat(rev(k),0)
|
|
Jul 9, 2018 at 13:26 | comment | added | Giuseppe |
But I think print is more efficient here, as it returns its argument: 56 bytes
|
|
Jul 9, 2018 at 12:56 | comment | added | Giuseppe |
I don't think you need >0 and cat(n,"") (empty string) will also work.
|
|
Jul 9, 2018 at 12:49 | history | edited | ngm | CC BY-SA 4.0 |
deleted 50 characters in body
|
Jul 9, 2018 at 12:38 | history | edited | ngm | CC BY-SA 4.0 |
added 52 characters in body
|
Jul 9, 2018 at 12:32 | history | edited | ngm | CC BY-SA 4.0 |
edited body
|
Jul 9, 2018 at 12:29 | history | answered | ngm | CC BY-SA 4.0 |