Ad
  • Custom User Avatar

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

  • Default User Avatar

    The kyu are given by a moderator according to the given average but not by the author.

  • Custom User Avatar

    Should be 8kyu

  • Custom User Avatar

    You're welcome. Thanks for your feddback and time solving this kata.

  • Custom User Avatar

    Yep, that my fault, thank you!

  • Custom User Avatar

    Yes sorry. 14 in the amount of odd primes below 80. You have a global variable in your code. Could you refactor it having only local variables and see if the problem persists?

  • Custom User Avatar

    Hello, thank you for reply!
    Yes, my result is: [14, 79, 97] when i execute it on my desktop. And it's currect result:
    When i push "submit", test fails:
    ✘ Expected: [14, 79, 97], instead got: [15, 97, 113]

    And i don't understand why my code have different results on codewars and on my desktop.

    thanks.

  • Custom User Avatar

    Hi karapetyan. I tested your code in ruby. For an upper bound 80:

    TRUE PRIMES: [3, 5, 7, 11, 13, 17, 19, 31, 37, 53, 59, 71, 73, 79]

    and your result is: [14, 79, 97]

    14 does not fulfil the required property for this kata

    Hope that you can fix the problem of your code.

  • 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

    Hello, if we have 1 rectangle sized 32 and 6 rectangles sized 1x1 they are equal and total count of rectangles == 6. But 4 rectangles sized 21 == 8.
    Are you sure that 4 rectangles sized 2x1 is correct value? for n = 2 and m = 3 ?