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.
Thank you very much. That makes perfect sense.
I think the honor points counter is sometimes bugged (only clientside).
If you complete another kata (any level) , your counter will probably be updated with current kata points and your last kata points (kyu5 here)
For instance
// I got 600 points . I complete a kyu5 (8pts) . My counter goes to 602 ( :'( )
// I complete a kyu7 (2pts). My counter goes to 610 (602+8)
The major problem I see is that even the intended solution (talking about ruby here) is not really "smart": it's simple brute force (with caching), but for some strange reason the prime checking is slightly faster than the built-in one, and thus the normal efforts fail.
Cheers mate!
Hi again. 1. There is no recursive relation applied here.
2. Only a smart brute force algorithm will solve it, as I did it (under the 12.000 ms).
Advice: Try to use a fast primality test.
Cheers. Raúl
I am a level 6 kyu and just solved a 5 kyu kata. For this I have received just 2 honor points.
Is this possible or is it a problem with the algorithm?
Hi Raul,
Thank you for the answer. The reason I was asking this, is because for this particular problem I see 2 ways to solve it:
Brains: You are a supermath genius that finds a mathematical function to calculate the elements or generate each new
element from the previous (or a number of previouses) element/s in the sequence.
Brawl: Write a simple script that verifies that a number fits the requirements. Run it continously until you collect
250 elements.(I expect this is why the author is indicating up to which elements in the sequence the program is tested)
Seeing how sparse the sequence was, I expect that this approach will take slightly longer than 12 seconds.
So my initial question was, is it fair to run the brawl method on my computer, wait (a few hours, a few days) to collect enough elements
and just write on code wars a function that selects elements from the hardcoded list if the input is <250 and it searches for new
elements otherwise. The 'search part' is just so that my code for testing the numbers can be seen by others.
This comment is hidden because it contains spoiler information about the solution