I am having a time limit exceeded error in my code. I need some help regarding this
created
last reply
- 2
replies
- 492
views
- 3
users
I am having a time limit exceeded error in my code. I need some help regarding this
In C++, I apparently made my code run faster by using sqrt() instead of floor() and not defining any functions, maybe that could work for you. Also remember no new line after the last test case. By the way I didn’t use Eratosthenes sieve or segmented sieve or something, it’s possible to do this with only just for loops and if statements.