시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 256 MB 27 8 6 27.273%

문제

Let m and n be two integers, 2 ≤ m < n ≤ 10000000. Consider the following set:

Prime(m, n) = { p | p prime and m ≤ p ≤ n }.

Compute the cardinal of the set Prime(m, n) .

입력

The input file consists of several tests. The input of each test is represented on a single line in the input file. Any two consecutive tests are separated by an empty line. For each test, the values for m and n are given on the same line, separated by exactly one space.

출력

For each test, the result will be written to standard output on a different line (the tests will have the same order as in the input file). The results of any two consecutive tests will be separated by an empty line. For each test, the result will be the cardinal of the set Prime(m, n).

예제 입력

2 20

70 110

5 150

예제 출력

8

10

33

힌트