Ad
  • Custom User Avatar

    Just solved it. Not broken.

  • Custom User Avatar

    This kata is still messing with people's head :)

  • Custom User Avatar

    Yeah, that was painful.

  • Default User Avatar

    I'm sorry too! You are right but it is not the question. No number x gives exactly m=6540715897 for n=48 hence the answer -1. Am I clear enough?-)

  • Default User Avatar

    I think you don't have correctly understood the kata. The description says:

    In other words we must find x such as n choose x = m (1) for a given m and a given n

    You have to solve an equation not an inequation. 37 choose 11 gives 854992152, not 6540715897

  • Default User Avatar

    Same problem here. :/

  • Default User Avatar

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

  • Custom User Avatar

    Thanks for letting us know. This has been fixed. You totally deserve the extra 2 honor for reporting this :)

  • Custom User Avatar

    Fixed, now. I just forgot to copy over the numericalCompare function. Sorry about that. ;/

  • Custom User Avatar

    That's a known problem. Code from the "preloaded" section doesn't get preloaded on example test case runs, but they will work on submit. One can use the following variant of 'numericalCompare` to check the code before submitting:

    var numericalCompare = function(a,b){
      return +a - +b;
    }