P29340 [洛谷] [COCI2006-2007#4] Rings
普及
题目描述

Problem Description

There are $n$ rings with different radii. They are placed in a row on the ground such that each ring, except the first and the last, touches its two adjacent rings.

You are asked to determine how many times each ring, except the first one, rotates when the first ring completes one full rotation.

Since the answers may not be integers, express them in the simplest fractional form, as shown in the examples.

Input Format

The first line of input contains an integer $n$, representing the number of rings.

The second line contains $n$ integers, representing the radii of the rings in order.

Output Format

The output consists of $n-1$ lines, each indicating the number of rotations of the corresponding ring (excluding the first one).

Sample Input and Output

Sample Input #1

3
8 4 2

Sample Output #1

2/1
4/1

Sample Input #2

4
12 3 8 4

Sample Output #2

4/1
3/2
3/1

Sample Input #3

4
300 1 1 300

Sample Output #3

300/1
300/1
1/1

Notes

Data Size and Constraints

For $100\%$ of the data, it is guaranteed that $3 \le n \le 100$ and the radii are between $1$ and $1000$ inclusive.

Notes

Translated from COCI2006-2007 CONTEST #4 T3 PRSTENI

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
3 8 4 2
样例输出
2/1 4/1