Các số nguyên tố (2026)


Submit solution

Points: 1
Time limit: 1.0s
Memory limit: 500M

Author:
Problem type

Cho 2 số nguyên dương a, b \((0 < a <= b <= 10^7)\). Đếm các số nguyên tố có trong đoạn [a, b] theo thứ tự tăng dần, mỗi số in trên 1 dòng.

Ví dụ:

Input:
1 10
Output:
4

Giải thích: Các số nguyên tố từ 1 đến 10 có 4 số: 2, 3, 5, 7


Comments

There are no comments at the moment.