N archers are shooting arrows at targets. There are infinite targets numbered starting with 1. The \(i^{th}\) archer shoots at all targets that are multiples of \(k_i\).
Find the smallest target that is hit by all the archers.
Input
The first line contains an integer T - the total no. of testc ases.
T test cases follow. Each test case is of the following format:
The first line contains a natural number - N - the number of archers. The second line contains N space-separated integers, where the \(i^{th}\) integer denotes the value of \(k_i\) for the \(i^{th}\) archer.
Output
For each test case, print the smallest target that is hit by all archers on a new line.
Constraints
\(1 \le T \le 5\)
\(1 \le N \le 15\)
\(1 \le k_i \le 48\)
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Login to unlock the editorial