Ad
  • Custom User Avatar

    It should be prime numbers. It means a whole number greater than 1 whose only factors are 1 and itself.

  • Custom User Avatar

    I think [4, 8, 10, 14, 16, 20] is a better answer, it equals 72.

  • Custom User Avatar

    If there are an equal number of naughty and nice it should return 'naughty'. In the example you provided there is 1 naughty ('broke...') and 1 nice ('got...') while the other 2 don't fit the pattern. Without seeing your code I can't offer suggestions but it worked for me in Ruby.

  • Default User Avatar

    The answer is in the description: "For comparing treat all letters as UpperCase."

  • Custom User Avatar

    I have the same question as a prior poster but can't read the answer since it's a spoiler. For ("gf","FG") the test wants to return true but how is this possible? Using str.ord I'm getting 103, 102 for "gf" and 70, 71 for "FG". How are these equal?

  • Default User Avatar

    In the future, look at the top of the page where you can see that more than 900 guys passed the kata. If a test was wrong somebody would have seen that, no?-)

  • Default User Avatar

    Sorry for misunderstanding. I've missed the word "greatest". Thank you.

  • Default User Avatar

    There are no error in the tests, sorry. How do you have negative numbers?

  • Custom User Avatar

    Same problem :/

  • Default User Avatar

    Hello, can you please fix test cases.

    Wrong :
    testing(MaxRotate.maxRot(38458215), 85821534);

    Right answer is - 85254183

  • Default User Avatar

    Print the input.

  • Custom User Avatar

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

  • Default User Avatar

    On my machine too, the last test fails. Even I want to know the scenario in which it fails :(

  • Custom User Avatar

    [5, 7, 11, 13, 17, 19] does not satisfy the [p, p + 4, p + 6, p + 10, p + 12, p + 16] criteria. I think you've got the intervals switched, like [p, p + 2, p + 6, p + 8, p + 12, p + 16]

  • Custom User Avatar

    My solution seems to work for this Kata but I think the author's is flawed. He lists the following test conditions:

    Test.assert_equals(find_primes_sextuplet(70),
     [7, 11, 13, 17, 19, 23])
     
     Test.assert_equals(find_primes_sextuplet(600),
     [97, 101, 103, 107, 109, 113])
    
     Test.assert_equals(find_primes_sextuplet(2000000),
     [1091257, 1091261, 1091263, 1091267, 1091269, 
     1091273])
    

    But the first sextuplet of primes > 70 is not [7, 11, 13, 17, 19, 23] (this equals 90). The correct answer is [5, 7, 11, 13, 17, 19] (equals 72). And that third test case is completely off because the total of the array shown is well over 6,000,000, and the correct sextuplet should be [333323, 333331, 333337, 333341, 333349, 333367]. Am I not understanding the requirements?

  • Loading more items...