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.
You are right. It should not raise an exception.
Luckily the tests don't contain invalid chars, so this solution passes.
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!
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.
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.
You are correct. Unfortunately I can't change it. I am still working up my honor points.
This comment is hidden because it contains spoiler information about the solution
That may be so, but Codewars is a kind of sport. Performance katas are like a race.
This comment is hidden because it contains spoiler information about the solution
[Python] Unfortunately the serious test always aborts with an error message because of the test code:
/workspace/default/tests.py:7: DeprecationWarning:
np.bool
is a deprecated alias for the builtinbool
. To silence this warning, usebool
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, usenp.bool_
here.Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
sieve = numpy.ones(n//3 + (n%6==2), dtype=numpy.bool)
Traceback (most recent call last):
File "/workspace/default/tests.py", line 54, in
result = f_sol(n)
File "/workspace/default/tests.py", line 36, in f_sol
max_even_digs = max(resDict.keys())
TypeError: 'int' object is not callable
Loading more items...