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 probably trained on this kata long ago and the sample tests were cached by Codewars, reset them
I can't reproduce that with the initial code.
Ok, I removed that entry. Let's wait and see what happens.
looking a tthe code, it lookw like what you're saying is impossible.
On the other hand, the input could be something equivalent to
00x
, then producex00
. But the constraint is on the output, not the input. => ?I couldn't reproduce. Are you sure?
this is javascript o_O
Plus, 2** is very easy to do for a computer.
This approach uses Python, that's not optimal in terms of speed.
There have been multiple issues already raised about insufficient tests in this kata, I have closed 10 of them this morning (!), one is enough.
The description says
The arguments will always be non empty strings, and normal letters.
, by which I interpreted it to mean the first argument will always be a non-empty string, and the second will always be a normal letter. Indeed, in several languages (although interestingly, not C) the second argument is a native char type, entirely ruling out tests that have more than one letter in the second argument.While defensive coding and sanity checks are a good idea in production code, I'm not shy about taking advantage of stated parameter constraints if a kata chooses to give them.