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.
This comment is hidden because it contains spoiler information about the solution
The function is powered by Fermat's little theorem, making it potentially faster (though less accurate) than a sieve. Adding tests on 5 and 7 will make this work up to 10^4
This comment is hidden because it contains spoiler information about the solution
Make the sample cases less redundant
I've been in Haskell for a while, so I'm kinda not doing this right. For example, Haskell has no built-in regex, so I didn't even try that.
Also, I'm awful at JS.
This comment is hidden because it contains spoiler information about the solution
Step 1: Cut a 14 x 14 square out of the 20 x 14 rectangle. This leaves a 14 x 6 rectangle.
Step 2: Cut a 9 x 9 square out of the 14 x 6 rectangle. Wait what? How did you do that?
I didn't have a numbers test, but I did have an empty string and there's no specification for empty strings, so that should be an invalid input. (Haskell)
That's... uhh... the exact opposite of the point of the site
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
don't look at it
it's an abomination
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Input is a string. I believe they're therefore immutable in Ruby, which makes things very weird.
OP try printing your answer before returning it and seeing if you are indeed returning the correct answer.
Loading more items...