Gromozeka has
N
hours. The
i
th clock hand (
\(1<=i<=N\)) is rotated 360 ° exactly
Ti
seconds. Initially, the hand of all clocks stands still and points straight up. Gromozeka starts all the clocks at the same time. After how many seconds will the hand of all clocks point straight up again?
Input
The first line contains an integer
N
(
\(1<=N<=100\)). The following
N
lines contain integers
Ti
(
\(1<=T_i<= 10^{18}\)), one number per line.
Imprint
Display the answer. It is guaranteed that the answer does not exceed
\(10^{18}\).
Examples
# |
Input |
Output |
Explanation |
1 |
2
2
3 |
6 |
We have two clocks. The time when the hand of each clock points up is as follows:
Clock 1: 2, 4, 6, ... seconds after start.
Clock 2: 3, 6, 9, ... seconds after start.
So it takes 6 seconds until the hands of both clocks point straight up again. |
2 |
5
2
5
10
1000000000000000000
1000000000000000000 |
1000000000000000000 |
|