#P6322. [COCI 2006/2007 #4] PRSTENI
[COCI 2006/2007 #4] PRSTENI
Problem Description
There are rings with different radii. Place them on the ground in a line in order, so that except for the first and the last ring, every other ring touches its two neighboring rings.
When the first ring rotates by full turn, find how many turns each of the other rings rotates.
Since the answer may not be an integer, output it as a simplest fraction. The format is shown in the sample.
Input Format
The first line contains an integer , the number of rings.
The second line contains integers, in order, representing the radius of each ring.
Output Format
Output a total of lines, representing the number of turns rotated by each ring except the first one.
3
8 4 2
2/1
4/1
4
12 3 8 4
4/1
3/2
3/1
4
300 1 1 300
300/1
300/1
1/1
Hint
Constraints
For of the testdata, it is guaranteed that , and each radius is between and (inclusive).
Notes
This problem is translated from COCI2006-2007 CONTEST #4 T3 PRSTENI
Translated by ChatGPT 5