What is the max limit of prime required in this program?
Or to say max limit of N?
As in line 15: m<=10000. This will give me prime till 10000. Time limit exceeds. Hence pls resolve this query.
Max limit of prime
as there are multiple testcases take the prime seive out of the testcases loop…if thats not the issue share the link of your code here
use prime seive only once in your code