#P6322. [COCI 2006/2007 #4] PRSTENI

[COCI 2006/2007 #4] PRSTENI

Problem Description

There are nn 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 11 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 nn, the number of rings.

The second line contains nn integers, in order, representing the radius of each ring.

Output Format

Output a total of n1n-1 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 100%100\% of the testdata, it is guaranteed that 3n1003 \le n \le 100, and each radius is between 11 and 10001000 (inclusive).

Notes

This problem is translated from COCI2006-2007 CONTEST #4 T3 PRSTENI

Translated by ChatGPT 5