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.
updated to Python 3.11
You are right. It should not raise an exception.
Luckily the tests don't contain invalid chars, so this solution passes.
How can this be the highest rated solution if it doesn't even ignore invalid chars?
Please clarify the description:
"... when they are an exact match, and appending the second string to the first if they are not.
NOTE: The strings may be empty."
Because these cases are not really clear from the given examples.
Thank you!
i think this has the first two conditions, but the upper limit may need to be added
At least Python: All test cases count 1 extra divisor, which is wrong.
Even the kata description is wrong: there are 70 not 71 factors in the example list: [2, 3, 4, 5, 6, 8, 9, 10, 12, 13, 15, 18, 20, 24, 25, 26, 30, 36, 39, 40, 45, 50, 52, 60, 65, 72, 75, 78, 90, 100, 104, 117, 120, 130, 150, 156, 180, 195, 200, 225, 234, 260, 300, 312, 325, 360, 390, 450, 468, 520, 585, 600, 650, 780, 900, 936, 975, 1170, 1300, 1560, 1800, 1950, 2340, 2600, 2925, 3900, 4680, 5850, 7800, 11700].
Python: the instructions should of course say that 2 <= m < n <= 11000000
string "6F43E8" must throw "Error" like instructions say at the end.
return false/False
or
throw "Error"
Rejected, see comments under the translation for details. Feel free to fork the translation, fix the issues, and republish.
Java translation
https://www.codewars.com/kumite/6377c8af0ab4f00057e3580e?sel=6377c8af0ab4f00057e3580e
Please approve it. Thank you.
I also clarified and improved the instructions, as many people here have wished.
This comment is hidden because it contains spoiler information about the solution
Yes, it is. But the instructions are not clear enough.
To clarify: Please print the input. '6F43E8' is not the input of the test where your code is failing.
Read this: https://docs.codewars.com/training/troubleshooting/#print-input
Your code fails another test case.
Also if you select Node v8.1.3 you may get clearer error messages.
Yes, I made the same experience.
I have translated it to Java. I proposed to clarify the instructions.
Loading more items...