Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    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.

  • Custom User Avatar

    A good coder is forced to be a minimum good at maths.

  • Default User Avatar

    Maybe the word 'translate' could be changed to 'convert', to avoid confusion with the biology term translation.

  • Default User Avatar

    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:-)

  • Default User Avatar

    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.

  • Default User Avatar

    It is sufficient to calculate 1 / n by hand to see what happens.

  • Default User Avatar

    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.