Hiển thị danh sách số nguyên tố

View as PDF

Submit solution

Points: 50.00 (partial)
Time limit: 1.0s
Memory limit: 10M
Input: stdin
Output: stdout

Author:
Problem type

Nhập vào số nguyên N, bạn hãy hiển thị các số nguyên tố trong khoảng từ 1 đến N.

INPUT: Giá trị N.

OUTPUT: Danh sách số nguyên tố thõa điều kiện trên một dòng, được sắp theo chiều tăng dần, mỗi số cách nhau bởi khoảng trắng.

RÀNG BUỘC: ~2<=N<=10^4~

VÍ DỤ
input
9
output
2 3 5 7

Comments

Please read the guidelines before commenting.


There are no comments at the moment.