Preparando MOJI

Primes in Interval

2000ms 65536K

Description:

You are given two integers a and b (a ≤ b). How many prime numbers are there on the interval from a to b, inclusive?

Input:

The input contains two integers a and b (2 ≤ a ≤ b ≤ 1 000 000), separated by a single space.

Output:

Output a single integer — the number of primes between a and b, inclusive.

Sample Input:

10 20

Sample Output:

4

Sample Input:

23 23

Sample Output:

1

Sample Input:

271 566

Sample Output:

46

Informação

Codeforces

Provedor Codeforces

Código CF661F

Tags

*special

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 09:05:56

Relacionados

Nada ainda