АВТ
Language:

Remote Training on Programming

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

37. Simple Numbers

Time Limit: 1.5 seconds
Memory Limit:64000KB
Points:10
View Problem Statistics Submit Problem added Administrator

Дано натуральное число n, не превосходящее 10000000. Вывести количество простых чисел в интервале от 1 до n включительно.

Input

Число n.

Output

Одно число - количество простых чисел.

Sample

InputOutput
104

View Problem Statistics Submit Author/source:
Sorted Problems / Mathematics / Theory of numbers /
38. Series of Farej 37. 134. Simple Numbers 2 876. Wordplay
Educational Courses / Data Structures and Algorithms / Enumeration, Dynamic Programming, Greedy algs /
296. Palindrom. 37. 295. Zoo
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.5 sec.
© Copyright VSTU, AVT, Nosov D.A.