Liệt Kê Nguyên Tố

PDF

Submit solution

Points: 10.00 (partial)
Time limit: 1.0s
Memory limit: 64M
Input: stdin
Output: stdout

Problem type
Allowed languages
C, C++, Java, Pascal, Python, Scratch, TEXT

Cho số nguyên dương ~n~.

Yêu cầu

Hãy liệt kê các số nguyên tố trong phạm vi từ ~1~ tới ~n~.

Dữ liệu

Một dòng duy nhất gồm số nguyên dương ~n~ ~(n\le 10^6)~.

Kết quả

Ghi ra các số nguyên tố tìm được theo thứ tự tăng dần, mỗi số một dòng.

Input

10

Output

2
3
5
7

Comments

Please read the guidelines before commenting.


There are no comments at the moment.