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.
Are you getting some sort of error or just time out?
So i tried these numbers on my local pc and everything works fine, also for 933555431. Still I don't know the issue. Could it be lack of memory or sth like that? What is more iteresting, my code also crashes or returns a bad value with 7919 on input, where it's a very easy case and also looks fine on my local machine.
It is a question, not an issue of the kata but a problem of your code. You could read https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution.
i tried to make it faster as much as i could but its still taking over 12 secs
created a list of primes and every new num checked on the list rather than range, checking only odd numbers
what can i do?
(python)
Ooh, I didn't think about it. Thank you for help, I will check this out, also for cases from codewars.
Do you also get a crash when running your solution in your IDE locally? Did you know what input crashes your solution? You can read this for some hints.
I did run your solution in my VS and it crashes at line 35:
primes[j] = false;
for some numbers, for example933555431
This comment is hidden because it contains spoiler information about the solution