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
ranshuman01:
20201202 16:11:30
sieve of eratosthenes not working 

t_t:
20201124 08:24:36
Why easy brute force works here? The test cases are not strong enough.


kumar_07:
20201123 16:08:11
you can find the full cpp solution at this link:


shreyasz_07:
20201121 05:27:09
Ig its very easy !


maxpayne2502:
20201115 06:20:58
in recent year new way to check a prime number is discovered check that 

pika_pika_:
20201029 14:54:11
how to reduce time limit...? please help


pandektis:
20201019 10:02:33
time limit exceeded... all the time.


emperorsamrat:
20201017 16:16:20
how to understand what is the error, its just show me that have an error, but the same code works very perfectly in my ide.Also it doesnt exeed the given time limit. 

jayaprakash971:
20201008 09:16:03
how much min time


darsna19:
20201007 09:16:12
@maxcool Find it in GitHub that's where :) 
Added by:  Adam Dzedzej 
Date:  20040501 
Time limit:  6s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: NODEJS PERL6 