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.
I originally misunderstood the description and had the same issue, so answering for future peoples.
The task is NOT about generating primes < 20 Milion. It's about FIRST 20 Million primes.
These are all primes less than 373_587_923.
That's a Sin
why so much code?
I generated 20 million primes, but when verifying the 5 millionth - 5 million and 13th prime, it says StopIteration?? But checking externally, the cases should pass just fine. Please help me understand this issue.
😂😂 Best Code ...
The exact form of the returned thing depends on language. You can also check example tests to see how the returned value is handled and how it should behave. I think you are trying to solve with Python, right? If you are working with Python, then your solution sohuld return an iterator which implements
__next__
dunder, and can be passed tonext
function.Hello. I may be asking a strange question, but what should the program return? I mean, I wrote an infinite prime number generator, but how do I connect it to this katya so that she accepts it all? Simple output of numbers is obviously not suitable.
LMFAOOOOOOOOOOO
Ok, I feel really really stupid here but can someone guide me through the first step of creating something that allows "next" in a static method?
I need to return an "iter" on an array in the method?
Do I need to pre-populate the array with the millions of primes?
That was one hell of a Kata, had it open for about 2 weeks and finally finished it today. Was just a case of wrangling with a certain algorithm which shall not be named to get it to work efficiently. Also using numpy arrays instead of lists.
breo what the skibidi
Same here. I've tried 3 different Sieves with lazy and non-lazy versions and they all time out. Python test cases accept the most straightforward and non-optimized algorithm
I guess, rust tests cases are not fair
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
How ingenious! Hope to figure out the magical mechanism.
Loading more items...