PRIME1  Prime Generator
Peter wants to generate some prime numbers for his cryptosystem. Help him! Your task is to generate all prime numbers between two given numbers!
Input
The input begins with the number t of test cases in a single line (t<=10). In each of the next t lines there are two numbers m and n (1 <= m <= n <= 1000000000, nm<=100000) separated by a space.
Output
For every test case print all prime numbers p such that m <= p <= n, one number per line, test cases separated by an empty line.
Example
Input: 2 1 10 3 5 Output: 2 3 5 7 3 5Warning: large Input/Output data, be careful with certain languages (though most should be OK if the algorithm is well designed)
Information
After cluster change, please consider PRINT as a more challenging problem.hide comments
ankitkumarx:
20220110 15:49:21
My code is taking 0.01 sec to execute, but the website is leaving a message of 'time limit exceed'. 

orno:
20211125 17:56:55
Does any of you have tricky testcases ?


amirthtr:
20211103 19:00:32
I have time error ((: 

amirthtr:
20211103 17:02:57
time limit exceeded= program is Heavy and overly complex solution Last edit: 20211103 18:21:42 

niezlypajacpl:
20211101 19:25:03
co to jest runtime error (NZEC) 

cameron_knows:
20211020 20:20:02
I'm getting correct output. Judge still not accepting? 

raman_95:
20210929 13:28:54
ideone is also showing success and with timelimits , but solution is Status bar shows Time limit exceeded . Anyone else facing the same issue


belrol:
20210923 22:30:29
I'm not sure how the judging system works here. Is it accepting only a predetermined solution, for example here the segmented sieve(which I only now looked up what is), or it accepts a few type of solutions? Because my code works perfectly and gives the exact required output, but I get "wrong answer" all the time for this problem. 

novinsky1:
20210816 15:02:16
<snip>


nullptrchef101:
20210729 10:29:00
Getting TLE, how to deal with it? 
Added by:  Adam Dzedzej 
Date:  20040501 
Time limit:  6s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: NODEJS PERL6 