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