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.
This comment is hidden because it contains spoiler information about the solution
woow!
Like it a lot
bad practice to reassign arguments
Thank you Chrono, I really didn't know about it
Use spoiler flag next time.
This comment is hidden because it contains spoiler information about the solution
Nice!
Give me a bit to debug. I think you've found a bug.
[Edit]
I've got it! The correct answer for 269097409565171420 is obvious -- it should be 269097409565171402, so check this out:
which outputs:
So it's not so much a bug in the accepted-algorithm as it is a numeric bug in the javascript tests. Javascript respresents its numbers floating-point that can only be counted on to contain 16 significant digits. See: http://stackoverflow.com/a/1086603
So, I will change the javascript tests to reduce the maximum possible random number to be 16 or fewer digits.
Very interesting find and thank you for your input! :)
[Edit] Fixed. I have adjusted the javascript test upper-bounds to be lower -- 16 digits or less, but I have left the others with 64-bit long integer support as-is.
Best kata ever
Tell me, how in the world 269097409565171400 has the same digits as 269097409565171420?
In Java return
null
."If v1 >= v2 then return nil, nothing, null or None." - I don't understand what I have to return in the case of Java. Can someone explain me?