luogu#P1835. 素数密度

素数密度

Background

Update:

  • 2024.8.12: Added a set of hack testdata.

Problem Description

Given L,RL,R, please compute the number of primes in the interval [L,R][L,R].

1LR<2311\leq L\leq R < 2^{31}RL106R-L\leq 10^6

Input Format

The first line contains two positive integers LL and RR.

Output Format

One line containing a single integer, the number of primes in the interval.

2 11
5

Hint

Translated by ChatGPT 5