QOJ.ac

QOJ

时间限制: 1.0 s 内存限制: 32 MB 总分: 30

#17565. PRSTENI

统计

在一个疲惫的早晨过后,Mirko 睡着了。然而,他的弟弟 Stanko 刚刚醒来,和他的哥哥一样,他现在兴奋不已。Stanko 在车库里发现了 $N$ 个半径各不相同的圆环。他把它们排列在地面上,使得每个圆环(除了第一个和最后一个)都与它前面和后面的圆环相切。

他开始旋转第一个圆环,并注意到其他圆环也随之旋转;有的转得更快,有的转得更慢!

他对自己的发现感到非常兴奋,决定计算在第一个圆环旋转一圈时,其他圆环分别旋转了多少圈。但在发现这个圈数并不总是整数且不知道该怎么办后,他放弃了。

请编写一个程序,确定在第一个圆环旋转一圈时,其余每个圆环分别旋转了多少圈。

输入格式

输入的第一行包含一个整数 $N$($3 \le N \le 100$),表示圆环的数量。

第二行包含 $N$ 个介于 $1$ 和 $1000$ 之间的整数,表示 Stanko 的圆环半径,按照它们在地面上排列的顺序给出。

输出格式

输出必须包含 $N-1$ 行。对于除第一个圆环之外的每个圆环,按照它们在输入中给出的顺序,输出一个分数 $A/B$,表示当第一个圆环旋转一圈时,该圆环旋转了 $A/B$ 圈。

分数必须是最简分数形式(即分子和分母没有大于 $1$ 的公约数)。

样例

输入 1

3 
8 4 2

输出 1

2/1 
4/1

输入 2

4 
12 3 8 4

输出 2

4/1 
3/2 
3/1

输入 3

4 
300 1 1 300

输出 3

300/1 
300/1 
1/1

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.