Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
It should be prime numbers. It means a whole number greater than 1 whose only factors are 1 and itself.
I think [4, 8, 10, 14, 16, 20] is a better answer, it equals 72.
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.
The answer is in the description: "For comparing treat all letters as UpperCase."
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?
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?-)
Sorry for misunderstanding. I've missed the word "greatest". Thank you.
There are no error in the tests, sorry. How do you have negative numbers?
Same problem :/
Hello, can you please fix test cases.
Wrong :
testing(MaxRotate.maxRot(38458215), 85821534);
Right answer is - 85254183
Print the input.
This comment is hidden because it contains spoiler information about the solution
On my machine too, the last test fails. Even I want to know the scenario in which it fails :(
[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]
My solution seems to work for this Kata but I think the author's is flawed. He lists the following test conditions:
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...