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 has to do with floating point rounding errors. The formula can be rearranged a little bit so that the rounding errors have less impact, I believe.
I suppose you don't read the note at the bottom of the page:
Beware when you post issue:-)
To post an issue believing is not enough:-) Give some explanation...
9 guys passed the R kata, not that much but enough to say there are no errors in the tests.
81 guys passed the Python translation and 21 the Ruby one. Python and Ruby give the same results as my R solution for your two cases.
The number of digits of the numerator for your two cases have exactly the required length.