Ordered Fractions
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Consider the set of all reduced fractions between 0 and 1 inclusive with denominators less than or equal to N.
Here is the set when N = 5:
Write a program that, given an integer N between 1 and 160 inclusive, prints the fractions in order of increasing magnitude.
Input
One line with a single integer N.
Output
One fraction per line, sorted in order of magnitude.
Examples
Input #1
Answer #1
Submissions 979
Acceptance rate 53%