#C9029. Hikers Meeting Time
Hikers Meeting Time
Hikers Meeting Time
You are given the lap times (in minutes) for a group of hikers. Each hiker completes a lap in a fixed amount of time. Your task is to determine the minimum number of minutes until all hikers meet again at the starting point. This is equivalent to finding the least common multiple (LCM) of the lap times.
You may use the formula for LCM: \(\mathrm{lcm}(a, b) = \frac{|a \times b|}{\gcd(a, b)}\), where \(\gcd(a, b)\) is the greatest common divisor of \(a\) and \(b\).
inputFormat
The input is read from standard input (stdin). The first line contains an integer \(T\), the number of test cases. Each of the following \(T\) lines contains a sequence of one or more positive integers separated by spaces, representing the lap times (in minutes) for the hikers in that test case.
outputFormat
For each test case, output a single integer on a new line to standard output (stdout), representing the minimum number of minutes until all hikers meet again at the starting point.
## sample5
3 4
1 2 3
2 3 6 9
5
2 3 5 7 11
12
6
18
5
2310
</p>