АВТ
Language:

Remote Training on Programming

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

134. Simple Numbers 2

Time Limit: 1 seconds
Memory Limit:64000KB
Points:2
View Problem Statistics Submit Problem added Administrator

Вывести на экран все простые числа (разделяя числа пробелом), не превосходящие заданное число N (N >= 1), которое вводится с клавиатуры. Простые числа не имеют других делителей кроме единицы и самого себя.

Input

Число N (целое число до 1000).

Output

Простые числа, не превышающие N, разделенные пробелом.

Sample

InputOutput
202 3 5 7 11 13 17 19

Автор:Бутусов А.С.

View Problem Statistics Submit Author/source:
Sorted Problems / Mathematics / Theory of numbers /
37. Simple Numbers 134. 876. Wordplay
Educational Courses / Programming and Basics of Algorithmization / Cycles /
166. Scales of Notation 134. 168. Sum of N Items 165. Sum of Series 127. Кол-во чисел с заданной суммой цифр
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.437 sec.
© Copyright VSTU, AVT, Nosov D.A.