2437. Enumerate All Prime Numbers

单点时限: 3.0 sec

内存限制: 256 MB

Your task is to print all prime numbers between a and b inclusive.

输入格式

The input consists of a series of a pair of positive integers which indicates a and b. Input terminated by EOF.

You can assume that input integers always fit in 32-bit signed integer. You can also assume that the difference of a and b is at most 500,000.

输出格式

For each test case, you should output all prime numbers between a and b inclusive. You should output completly like sample output shown below. If there is no prime number, You should output “no prime number.”.

样例

Input
2 3
1 10
1 1
1000000000 1000000010
Output
2 3
2 3 5 7
no prime number.
1000000007 1000000009

7 人解决,27 人已尝试。

11 份提交通过,共有 122 份提交。

8.3 EMB 奖励。

创建: 15 年,4 月前.

修改: 6 年,8 月前.

最后提交: 3 年,5 月前.

来源: ECNU 选拔 2008

题目标签