TouchStone
  Please Login
Login Sign Up
 Homepage  Problem Set  Examinations  Submissions  Discussions  Statistics
  • Home
  • Problem Set
  • P3264
  • Problem
  • P3264【四月月赛】法雷数列
    Limits : Time Limit : 10000 MS   Memory Limit : 65536 KB
    Description

    对任意给定的一个自然数n,将分母小于等于n的不可约的真分数按升序排
    列,并且在第一个分数之前加上0/1,在最后一个分数之后加上1/1,这个序列称
    为n级法雷数列,以Fn表示。如F5为:0/1,1/5, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3,3/4, 4/5,1/1.
    现在给出n让你求其n级法雷数列

    Input Format

    一个整数n(1<=n<=100).

    Output Format

    输出n级法雷数列,以空格做间隔。

    Sample Input

    5

    Sample Output

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