2.1 frac1
来源:互联网 发布:王石田朴珺 知乎 编辑:程序博客网 时间:2024/05/21 01:32
Ordered Fractions
Consider the set of all reduced fractions between 0 and 1 inclusivewith denominators less than or equal to N.
Here is the set when N = 5:
0/1 1/5 1/4 1/3 2/5 1/2 3/5 2/3 3/4 4/5 1/1
Write a program that, given an integer N between 1 and 160 inclusive,prints the fractions in order of increasing magnitude.
PROGRAM NAME: frac1
INPUT FORMAT
One line with a single integer N.
SAMPLE INPUT (file frac1.in)
5
OUTPUT FORMAT
One fraction per line, sorted in order of magnitude.
SAMPLE OUTPUT (file frac1.out)
0/1
1/5
1/4
1/3
2/5
1/2
3/5
2/3
3/4
4/5
1/1
- 2.1 frac1
- usaco 2.1.2 frac1
- USACO 2.1 frac1
- USACO 2.1 frac1
- Section 2.1 frac1
- USACO 2.1 Ordered Fractions (frac1)
- usaco 2.1 frac1 2008.5.10
- USACO:frac1
- usaco frac1
- usaco frac1
- usaco——frac1
- USACO frac1直接排序
- USACO2.1.2 Ordered Fractions (frac1)
- USACO2.1.2 Ordered Fractions (frac1)
- 2.1
- 2.1
- 2.1
- 2.1
- 主流报表制作工具之王者争夺战:功能大PK系列之参数界面设置
- SOCKET 服务器和客户端通信
- 内存管理API
- Linux启动界面切换:图形界面-字符界面(转)
- 连接数据库发生异常com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primar
- 2.1 frac1
- 跳转指令
- 今天的碰头会议
- 2.1 sort3三值排序
- pctfree和pctused,initrans,maxtrans,next
- MatPlotLib
- MFC编程参考
- 被哥忘却的函数指针
- 关于DIV块背景图设置问题