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 would be "mathwars" if we were to prove the formula, but all that is needed is to observe the pattern.
Made it, finally.
Okay, this StackOverflow post solved the cannot redeclare problem:
https://stackoverflow.com/questions/41814324/php-cannot-redeclare-function-call-to-undefined-function?noredirect=1&lq=1
Now I'm to decipher what 'Undefined offset' error (that I get when trying to attempt my solution) means...
I'm attempting in PHP and get this error:
PHP Fatal error: Cannot redeclare kPrimeFactors() (previously declared in /home/codewarrior/run.php:7) in /home/codewarrior/run.php on line 7
I tried to rename this local function (that I made inside the kPrimesStep function) but renaming didn't help.
Please, can somebody tell me what I am doing wrong?
This comment is hidden because it contains spoiler information about the solution
It turned out that you are - for absolutely no reason, IMHO - forced to use the FM prefix modifier in to_char function in order to pass the tests. Pretty weird. I'm NOT satisfied with this kata.
I have the same problem: the same values showing as the expected results, formatted the same way as the expected results, yet it finds some mysterious error when it comes to the "should should return the expected results" part... How can I figure out what's wrong?