АВТ
Language:

Remote Training on Programming

Problems On-line status Contests FAQ
For authors:
Register  ||  Login
 
Hello, Guest! Login or register.

881. Prime numbers on interval

Time Limit: 2 seconds
Memory Limit:65535KB
Points:10
View Problem Statistics Submit Problem added Undefined

Нужно просто найти количество простых чисел в интервале от a до b.

Input

Два натуральных числа a и b, разделённые пробелом.
Ограничения: 2<=a<=b<=1012, (b-a)<=107

Output

Искомое количество простых чисел

Sample

InputOutput
10 20
4

View Problem Statistics Submit Author/source:
Sorted Problems / Mathematics / Theory of numbers /
468. Power 881. 879. Sequence strikes back! 38. Series of Farej 37. Simple Numbers
Problems from Contests / Trainings of Vologda STU / Training 07.10.10 /
880. A - Doubling and increment 881. 34. C - GCD & LCS 712. D - Пересечение отрезков
We can all benefit by doing occasional "toy" programs, when artificial restrictions are set up, so that we are forced to push our abilities to the limit. The art of tackling miniproblems with all our energy will sharpen our talents for the real problems. Donald E. Knuth.
time generating 0.062 sec.
© Copyright VSTU, AVT, Nosov D.A.