Problem2149--筛选法找质数

2149: 筛选法找质数

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

用筛法求出n(2≤n≤1000) 以内的全部质数。

Input

输入n。

Output

多行,由小到大的质数。

Sample Input Copy

10

Sample Output Copy

2
3
5
7

Source/Category