logo AlgoBeat OnlineJudge
登录 注册

#200450. [USACO2.1] Ordered Fractions

内存限制:125 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

Consider the set of all reduced fractions between and inclusive with denominators less than or equal to .

Here is the set when :

Write a program that, given an integer between and inclusive, prints the fractions in order of increasing magnitude.

输入格式

One line with a single integer .

输出格式

One fraction per line, sorted in order of magnitude.

样例

样例输入 1

5

样例输出 1

0/1
1/5
1/4
1/3
2/5
1/2
3/5
2/3
3/4
4/5
1/1

数据范围与提示

USACO Training Section 2.1.