Ad
  • Custom User Avatar

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

  • Custom User Avatar

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

  • Default User Avatar

    Very effective formulation given the description of input! Thank you!

  • Custom User Avatar
  • Custom User Avatar

    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.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Default User Avatar

    I suppose you don't read the note at the bottom of the page:

    In Javascript, Coffeescript, Typescript, C++, PHP, C, R, Nim to get around the fact that we have no big integers 
    
    the function easyLine(n) will in fact return round(log(easyline(n))) and not the easyline(n) of the other languages.
    
    So, in Javascript, Coffeescript, Typescript, C++, PHP, R, Nim and C:
    
    easyLine(0) => 0
    easyLine(1) => 1
    easyLine(4) => 4
    easyLine(50) => 67
    

    Beware when you post issue:-)

  • Custom User Avatar

    Well, I assume that I have to repost the issue rather than to reply under the old one. Here's the explanation.
    R:
    testing(7, 8)
    testing(13, 16)
    testing(17, 22)
    Python:
    testing(easyline(7), 3432)
    testing(easyline(13), 10400600)
    testing(easyline(17), 2333606220)
    testing(easyline(19), 35345263800)

  • Custom User Avatar

    Well, here's the explanation.
    R:
    testing(7, 8)
    testing(13, 16)
    testing(17, 22)
    Python:
    testing(easyline(7), 3432)
    testing(easyline(13), 10400600)
    testing(easyline(17), 2333606220)
    testing(easyline(19), 35345263800)

  • Default User Avatar

    To post an issue believing is not enough:-) Give some explanation...

  • Custom User Avatar

    I beleive the testing codes with R are incorrect though there are 181 people on the done-list with R. Plz check this.

  • Default User Avatar

    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.

  • Custom User Avatar

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