#ABC070C. [ABC070C] Multiple Clocks

[ABC070C] Multiple Clocks

提示:该题测试数据补录中,暂不支持评测提交。

No testdata at current.

No submission language available for this problem.

Score : 300300 points

Problem Statement

We have NN clocks. The hand of the ii-th clock (1≤i≤N)(1 \leq i \leq N) rotates through 360∘360^\circ in exactly TiT_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again?

Constraints

  • 1≤N≤1001 \leq N \leq 100
  • 1≤Ti≤10181 \leq T_i \leq 10^{18}
  • All input values are integers.
  • The correct answer is at most 101810^{18} seconds.

Input

Input is given from Standard Input in the following format:

NN

T1T_1

::

TNT_N

Output

Print the number of seconds after which the hand of every clock point directly upward again.

2
2
3
6

We have two clocks. The time when the hand of each clock points upward is as follows:

  • Clock 11: 22, 44, 66, ...... seconds after the beginning
  • Clock 22: 33, 66, 99, ...... seconds after the beginning

Therefore, it takes 66 seconds until the hands of both clocks point directly upward.

5
2
5
10
1000000000000000000
1000000000000000000
1000000000000000000