ID προβλήματος: | farey
|
---|
Τίτλος: | Σειρές Farey
|
---|
Βαθμός Δυσκολίας: | 5
|
---|
Ημερομηνία Εισαγωγής: | 2000-06-04
|
---|
Σχόλια: |
|
---|
Σειρές Farey
Write a program which outputs, for each given integer N,
N greater or equal than 1, less or equal to 300, the
ascending sequence of all reduced fractions from [0,1]
having the denominator not greater than N. A fraction
is reduced if its nominator and denominator are relatively
primes. The input will be a series of integers N, one at a
line. The output should be as in the example.
Παραδείγματα εισόδου/εξόδου
Είσοδος | Έξοδος
|
---|
6
7
|
N=6
1/6
1/5
1/4
1/3
2/5
1/2
3/5
2/3
3/4
4/5
5/6
1/1
---
N=7
1/7
1/6
1/5
1/4
2/7
1/3
2/5
3/7
1/2
4/7
3/5
2/3
5/7
3/4
4/5
5/6
6/7
1/1
---
|