Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
that's a good code
厉害,一行搞定
I love it. Short. Elegant. Literally does what this function is supposed to do. Change every character except the last 4. Beauty!
This one's hot, love it!
This comment is hidden because it contains spoiler information about the solution
This solution is far more elegant than the top one. In fact, no solution could be simpler than this one.
This comment is hidden because it contains spoiler information about the solution
with round we dont have equal chance for all possible numbers. first and last have half others chance to appear.
A test running this function 4000 times for dice(0,3). counting appearance of each number, shows:
[17% ,34% ,33% ,16%]
Indeed thats great solution.
I believe this to be the superior solution and am amazed that a more abstracted solution is at a higher rating.