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.
Your
primes
variable does not really do what you'd probably hope it to do. Your inner loop (the one overj
) andprimes
vector do quite a lot of work which is superfluous, discarded soon after used, and not really useful.Found it. Thanks!
Avoid using loops.
Not an issue. Something's wrong with your code.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Post your code using markdown formatting and marking your post as having spoiler content then.
Sample tests + my own with bigger values all pass.
That's weird, I've tried with a less optimized code and it passed, are you sure you don't have an infinite loop somewhere?
This comment is hidden because it contains spoiler information about the solution