Ad
  • Custom User Avatar

    That's not how you count a gap, when there is a prime number it's over. You can't choose to ignore it.

    101-103 2-gap
    103-107 4-gap
    104-109 2-gap
    
  • Custom User Avatar

    And what about (101, 109)? We have 102, 104, 105, 106 and 108 between them which means a 6-gap. Why the right answer is None?

  • Custom User Avatar

    No problem, I don't know why I checked Python (I jump from language to language to solve some issues sometimes), good to know the number of tests is the same (that's not always the case).

  • Custom User Avatar

    I think in Python they're 510.

  • Custom User Avatar

    This isn't a kata issue, you misunderstood what to do, it's even explained in the instructions:

    gap(6,100,110) --> nil or {0, 0} : between 100 and 110 we have 101, 103, 107, 109 but 101-107 is not a 6-gap because there is 103 in between and 103-109 is not a 6-gap because there is 107 in between.