Ad
  • Custom User Avatar

    i like this one, clean with easy methods

  • Custom User Avatar

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

  • Default User Avatar

    Damn, i missed the opportunity to avoid the math package ... xD.

  • Default User Avatar

    Same here. Based on this description and the expected outcome of the examples, I haven't got a clue what to add up.
    I'm a mathematician, mind you.

  • Custom User Avatar

    even after using round and log, the tests are expecting wrong values.
    the easyLine(4) should be 3 and not 4, because round(2.77) = 3

    Expected: 8, instead got: 5
    Expected: 16, instead got: 9
    Expected: 22, instead got: 12
    Expected: 24, instead got: 13

    again, both examples and tests are wrong even when using round + log

  • Default User Avatar

    Did you read the description?

    Note:
    In Javascript, Coffeescript, Typescript, C++, PHP, C, R, Nim, Fortran 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, C, Fortran:
    
    easyLine(0) => 0
    easyLine(1) => 1
    easyLine(4) => 4
    easyLine(50) => 67
    

    (at the bottom of description)

  • Custom User Avatar

    Tests and Examples does not match the instructions.
    Instructions = sum of the squares of the binomial coefficients on a given line = sum of entries in row of pascal triangle = 2^n
    What the hack is going on?

    And why examples are inconsistend as well??
    easyline(4) => 70
    easyline(4) => 4

    shouldnt easyline(4) => 2^4 = 16 ???

  • Default User Avatar

    If I understand you correctly try b) or c).

    IMO this is a math puzzle and not really coding, but that goes for like +80% of the kata. Should rename this site Mathwars.

  • Default User Avatar

    Hey there! I need a suggestion. I'm running in this problem: The factorial numbers are to big and i get rounding errors. What can I do to fix this? Should I try to... a) use unsigned long integers b) find an analytical solution to the squared binomial coefficient problem c) something different. I dont calculate the factorials flat, I only ceep the therms that dont cancel out and i stay on the left side of the triangle (The right side of the trinangle is defined by symmetry to avoid big factorials). Thanks for your help!