АВТ
Language:

Remote Training on Programming

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

1029. A557

Time Limit: 1 seconds
Memory Limit:65536KB
Points:2
View Problem Statistics Submit Problem added Undefined

Дано натуральное число n большее 2

Найти все простые числа от 2 до n включительно, используя решето Эратосфена

Input

Одно натуральное число n. 2<=n<=10000

Output

Одно или несколько чисел, разделённых пробелами

Sample

InputOutput
Пример 1. Вход:
10
Пример 1. Выход:
2 3 5 7

View Problem Statistics Submit Author/source:
Educational Courses / New problems in testing /
1035. A46 1029. 1024. A58 979. A61 1037. A63
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.063 sec.
© Copyright VSTU, AVT, Nosov D.A.