АВТ
Language:

Remote Training on Programming

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

38. Series of Farej

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

Задано натуральное число n <= 100. Ряд расположенных в порядке возрастания рациональных несократимых дробей с положительными знаменателями, не превосходящими n, называется рядом Фарея.
Выведите часть ряда Фарея, в которой элементы имеют значения больше 0, но меньше 1.

Input

Число n.

Output

Последовательность дробей вида a/b, разделенных пробелами

Sample

InputOutput
51/5 1/4 1/3 2/5 1/2 3/5 2/3 3/4 4/5

View Problem Statistics Submit Author/source:
Sorted Problems / Mathematics / Theory of numbers /
879. Sequence strikes back! 38. 37. Simple Numbers 134. Simple Numbers 2 876. Wordplay
Problems from Contests / Trainings of Vologda STU / Training 19.11.2008 /
6. Polynom's Roots 38.
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.