The least common multiple (LCM) of a set of positive integers is the smallest positive integer that is divisible by all the numbers in the set. For example, the LCM of , , and is .
You are required to find the LCM for each given set of numbers.
The first line contains the number of tests.
Each test case is a single line containing m\ n_1\ n_2\ n_3\ \dots\ n_m, where (1 \leq m \leq 100) is the number of integers in the set, and n_1, \dots, n_m are the integers themselves. All integers are positive and within the range of a -bit integer.
For each test case, print the corresponding LCM value on a separate line. All output values will fit within the range of a -bit integer.
Beispiel 1