Sàng số nguyên tố trên đoạn

View as PDF

Points: 100 (p) Time limit: 1.0s Memory limit: 1G Input: stdin Output: stdout

Nhập \(2\) số nguyên dương \(A, B\). In ra các số nguyên tố trong khoảng từ \(A\) đến \(B\) (chú ý lấy cả \(2\) cận \(A\), \(B\)).

Input

  • Nhập \(2\) số nguyên dương \(A, B\) (\(1 \leq A \leq B \leq 10^6\)).

Output

  • In ra kết quả theo yêu cầu đề bài.

Example

Test 1
Input
4 20
Output
5 7 11 13 17 19
Test 2
Input
1 5
Output
2 3 5

Comments

There are no comments at the moment.