#P1835. 素数密度

    ID: 788 远端评测题 1000ms 128MiB 尝试: 3 已通过: 0 难度: 5 上传者: 标签>NOI 导刊枚举,暴力素数判断,质数,筛法概率论,统计

素数密度

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