1848: 【例5.7】筛选法找质数

Memory Limit:64 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

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

Input

输入$n$。

Output

多行,由小到大的质数。

Sample Input Copy

10

Sample Output Copy

2
3
5
7

Source/Category