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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
FYI, I just reran one of my past solutions, which completed the 200 tests in less than a second on the server.
I wonder what we two do differently, because first of all, Python 3.8 version is unavailable for me here on CW, I can select only 3.6. When I do so, I submit following dummy solution:
what obviously makes all tests fail, but it gives some potentially useful output which I pasted here. It's not really interesting except last ~30 cases with big numbers, which you could use for benchmarking.
Unfortunately I haven't solved the kata yet so I won't ask you for your code, but if your benchmarks run locally on above inputs efficiently but still timeout on CW, you might want to ask for help on kata solving channel.
I have not solved the kata in Python, but you could try following things:
return 1
should do). All tests will fail, but you will see how many of them is there and what are parameters used. As far as I see, there's 200 test cases.because in that kata, the restriction aren't the same, that's all. Those are "anti-cheat" measures (not powerful ones...). So what's allowed or not depends on who implemented the restrictions.
Because it's not easy to find out if it's in a comment or not, so it's forbidden everywhere.
that's because you wrote "code" somewhere in your solution. Possibly in a comment or as part of something else. And that's forbidden by the restrictions.
nothing is broken, the module is already imported in the preloaded part, that's all.
You can see test inputs by printing them, see this paragraph of the FAQ. Hopefully this will help you to find out why your solution returns
None
sometimes.This solution is probably older than two months. It's possible it was submited when only Python 2 was available on CW, and there were no Python 3. Now Python 2 is not available anymore, and solutions using Python 2 cannot be submitted.
Solutions from old language versions are not automatically invalidated, that's why you can still see them and they still attract upvotes.
There is something called python 2. Also, it is invalidated
Why not post it on kata's discourse? This is completely off-topic...
Your function should return the result instead of printing it.