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.
Here for decodeBits("1110000000111") it return
...
, should it be- -
?whats going on here, and is this making your computation faster?
Thank you for your reply. I didn't understand the meaning of the question correctly before.
The description says:
I
must be composed of positive or negative integers and1
is a positive integer so there is no problem in the input. The problem is in your "Actual" since you considered1
as a prime factor of all elements of the input which is false since1
is not a prime number (not being a prime number it can't be in this kata considered as a factor). Hence your "actual" is false and the correct answer is "Expect". Cheers.In the kata instructions, it says
But it generate random test contains 1 as prime factor(Small probability)
I would recommend modifying the test data generator.
I have found the problem which may lead to TLE or MLE, now I have solved it. Nice kata.
Ok, thanks a lot, I will try to optimize my code.
Hi,
I just tried the python version again and it's working perfectly fine.
I'm not really sure what you get as error here, but what's sure is that your code is effectively too slow: tests go up to 19 so with 9s up to 9 only, well... ;)
if the tests are interrupted without any feedback at the end, maybe it's related to an out of memory error (tho, this one generally leads to a totally empty feedback, so... I don't know).
In any case, this is not a kata issue.
cheers
run it again and look at the time, it may not be exactly the same... but then, realize this is a 1kyu kata, and again, I assure you the most likely reason you are not passing is because your code is simply not fast enough
Other kata's time limit is usually be set to 12 seconds.
This kata did not reach 12 seconds, and didn't show any information about time limit, so I have this question.
Would it be better to add a timeout prompt to the test?
every single kata will time out, so your code is probably not optimized enough to solve this kata
Is there a time limit for this problem?
I got following log, but not found any message of the reason why it failed
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution