I am going to mark this issue as resolved, because it's not a kata issue. It's related to how mechanism of invalidating of old solutions works (or not).
I have not solved the kata in Python so I cannot see solutions or invalidate them, but I will try to get someone on this.
Language Python?
The tests were modified a few months ago. Bad solutions (including codes with "xrange") were not invalidated maybe because there are lots of solutions (4233); it is not the first time I see that at CW. It is not a problem of the kata itself so I don't think it is an issue (I can be wrong...).
... Then, I copy-pasted the first solution... it timed out.
For me it didn't time out since it uses "xrange" and didn't pass. You could have taken mine that regularly passes in about 700 ms...
Maybe @hobovsky is able to make the bad ones disappear and I let him decide if the issue is resolved or not.
Sometimes it might happen that tests are bad and let some insufficient solutions pass initially, but they get improved later so new bad solutions do not pass anymore, but old ones are still listed as valid. Solutions which do not pass new tests should be automatically invalidated and hidden, but it does not always happen.
If you tell me the language, i will revalidate top solutions so the bad ones will disappear.
And you need to think of a better solution. Or check the second one from the list.
Well, not really. There are many solutions which do not use sieve.
You have to use sieve to calculate the primes
Ended up researching a lot about primes and used Eratosthenes' sieve with just index checks, and sped things up soo much.
done
I am going to mark this issue as resolved, because it's not a kata issue. It's related to how mechanism of invalidating of old solutions works (or not).
I have not solved the kata in Python so I cannot see solutions or invalidate them, but I will try to get someone on this.
Indeed, I was using the python language and replaced the xrange reference with range.
Language Python?
The tests were modified a few months ago. Bad solutions (including codes with "xrange") were not invalidated maybe because there are lots of solutions (4233); it is not the first time I see that at CW. It is not a problem of the kata itself so I don't think it is an issue (I can be wrong...).
For me it didn't time out since it uses "xrange" and didn't pass. You could have taken mine that regularly passes in about 700 ms...
Maybe @hobovsky is able to make the bad ones disappear and I let him decide if the issue is resolved or not.
Solution for what language is that?
Sometimes it might happen that tests are bad and let some insufficient solutions pass initially, but they get improved later so new bad solutions do not pass anymore, but old ones are still listed as valid. Solutions which do not pass new tests should be automatically invalidated and hidden, but it does not always happen.
If you tell me the language, i will revalidate top solutions so the bad ones will disappear.
And you need to think of a better solution. Or check the second one from the list.
This comment is hidden because it contains spoiler information about the solution