|
|
back to board<-- TLE? Look here! --> Posted by Diego 12 Apr 2020 20:22 Hi everyone! If you are getting TLE in Test #2 or maybe another, I would like to give you a little help: -> Test #2 seems to give large numbers (like 15000), and it gives you those numbers in increasing order. Think about it. Now, if that isn't enogh, I can give you a little more help: -> Create an array / vector / list which will store the prime numbers you find. -> Create an algorithm that determines whether a number is prime or not (remember to only compare with odd numbers smaller than the square root of the number from which you are trying to figure out its primality). -> Create a function that calculates the n-th prime number. For that create a counter which increases everytime you find a new prime number and store that prime number in your array / vector / list. -> Finally, remember the thing I said at the beginning of this post! :D Hope it helps. :D Re: <-- TLE? Look here! --> Posted by feather 27 Oct 2020 23:23 since it's recent enough, that gives some hope... honestly, i've done all of listed above, and yet it gives TLE. i'm so done with this... please help... |
|
|