Ad
  • Custom User Avatar

    Sure hope this isn't a stupid question. I'm passing all the sample tests except for the last one that was commented out. It says it should be 105, but I'm getting 104.

    Can someone please explain to me why cutLog(p, 35) is supposed to return 105 and not 104? Even going through it manually, I can't find any pair that adds up to 105.

    Here's p:

    // indxs:  0    1    2    3    4    5    6    7    8    9  ... and so on
    ------------------------------------------------------------------
    var p = [  0,   1,   5,   8,   9,  10,  17,  17,  20,  24, // 0X's
              30,  32,  35,  39,  43,  43,  45,  49,  50,  54, // 1X's
              57,  60,  65,  68,  70,  74,  80,  81,  84,  85, // 2X's
              87,  91,  95,  99, 101, 104, 107, 112, 115, 116, // 3X's
             119] // 40th element