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

  • Custom User Avatar

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

  • Custom User Avatar

    Something is weird with the Javascript tests. My code should be OK (the same algorithm passed in Python with no trouble whatsoever), but 4 of the tests give a message like this:

    ==========
    Expected: '96', instead got: '[[4505, 2252], [1503, 750], [647, 320], [505, 248], [415, 202], [353, 170], [225, 102], [153, 60], [135, 48], [103, 20], [97, 10], [95, 2]]'

    Out of curiosity, I added this to the code:
    if (n == 9009) return 96;

    and then it turns out that the tests expect the value I pass normally:

    ==========
    Expected: '[[4505, 2252], [1503, 750], [647, 320], [505, 248], [415, 202], [353, 170], [225, 102], [153, 60], [135, 48], [103, 20], [97, 10], [95, 2]]', instead got: '96'

    Can somebody help explaining what is going on? I do not have very much experience with Javascript yet.