303414: CF661F. Primes in Interval
Memory Limit:64 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
F. Primes in Intervaltime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard output
You are given two integers a and b (a ≤ b). How many prime numbers are there on the interval from a to b, inclusive?
InputThe input contains two integers a and b (2 ≤ a ≤ b ≤ 1 000 000), separated by a single space.
OutputOutput a single integer — the number of primes between a and b, inclusive.
ExamplesInput10 20Output
4Input
23 23Output
1Input
271 566Output
46