~/algor $ cat problems/for-oraliqdagi-tub-sonlar
Primes in a range
Medium
1000 ms
64 MB
48%
Positive integers $a$ and $b$ are given ($a \le b$). Determine how many prime numbers there are among the numbers from $a$ to $b$ (including $a$ and $b$).
A prime number is a positive integer greater than $1$ that is divisible only by $1$ and itself ($1$ is not prime).
Input
One line with two positive integers: $a$ and $b$.
Output
One integer — the number of primes.
Note
$1 \le a \le b \le 10^{4}$
Examples
Input #1
1 10
Output #1
4
Input #2
10 20
Output #2
4