LogiQuest

136. LCM of an Array

EasyGCDLCM

Print the least common multiple of all the numbers.

Input format

Line 1: n Line 2: n positive integers

Output format

The LCM.

Example 1

Input

3
2 3 4

Output

12

Example 2

Input

1
7

Output

7

Constraints

1 ≤ n ≤ 50 1 ≤ values ≤ 100

Read input from standard input and print the answer to standard output. Your code is judged against 5 test cases, most of them hidden.

Loading the MyLoginn IDE…