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
I am studying programming and not math. This is obviously a math problem and requires little programming skill. I have no idea why it's posted as a programming challenge.
A good coder is forced to be a minimum good at maths.
Maybe the word 'translate' could be changed to 'convert', to avoid confusion with the biology term translation.
Sorry but five minutes with pen and paper are sufficient to see what happens... There is no trick! Moreover there is no "waste of time" when you make your brain work:-)
Yes I agree, I actually hate these sorts of katas where there's some sort of discovery required i.e. you happen to figure out what the trick is. If you don't, you can spend days wasting your time.
It's not a coding kata, it's a "Find the magical trick" kata.
It is sufficient to calculate 1 / n by hand to see what happens.
Anyone who knew the math would find writing this code trivial. I didn't know the math and spent hours trying to optimise a BigDecimal function over a variety of different interval checking algorithms. In the end it still timed out for intervals over 300,000 digits long.
This should be clearly labeled as a math question. Anyone that knows the math would find writing the code trivial. It seems to me that this kata is here mostly for bragging rights for people that are very good at math.