P27871 [洛谷] [GESP202306 Level 2] Finding Primes
普及
题目描述

Problem Description

Xiao Ming has just learned about the concept of prime numbers: a prime number is a positive integer greater than $1$ that cannot be divided evenly by any positive integer other than $1$ and itself. Now, Xiao Ming wants to find out how many prime numbers exist between two positive integers $A$ and $B$ (including $A$ and $B$).

Input Format

The input consists of a single line with two positive integers $A$ and $B$. It is guaranteed that $2 \le A \le B \le 1000$.

Output Format

Output a single line containing an integer $C$, which represents the number of prime numbers found.

Sample Input and Output

Sample Input #1

2 10

Sample Output #1

4

Sample Input #2

98 100

Sample Output #2

0

Notes

Sample Explanation 1

There are $4$ prime numbers between $2$ and $10$, which are: $2$, $3$, $5$, and $7$.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
2 10
样例输出
4