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.
If you're referring to the Solution tab, no real reason. I just copied and pasted from my own solution. If that's not allowed, please let me know. For the refsol, I just tweaked it to use one loop instead of two and gave the variables better names. It's basically the same function.
Try it with a few small numbers on paper, and hopefully, you'll spot the pattern.
PHP fork to fix this issue and enable PHP 8.
JS fork:
Mocha
+Chai
for assertion).JS tests fall short of the kata spec (
0 < n < 10e6
), and also found forn = 2441400
the reference solution returnsundefined
instead of the expected triplet, though it works for some larger values.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Although not explicitly stated, the sample tests indicate that the price isn't always an integer, so your calculation might be wrong, and also you type hint the input (see what happened when in not strict mode?).
Closing as this is not an issue with the tests.
Should be fixed by the fork above.
PHP fork:
should fix this issue.
The tests are okay.
Your current solution doesn't meet the expected condition:
not an issue.
expected input from description:
PHP translation
Thanks for the review. I updated and changed the tests to a maximum of 8 letters.
JavaScript fork to add random tests, fixing this issue.
Please review, and note that it will invalidate user solutions.
Loading more items...