#K1746. Largest Possible Final Number
Largest Possible Final Number
Largest Possible Final Number
You are given a sequence of numbers and your task is to compute the product of all the numbers in the sequence. Formally, for a sequence of n numbers, you need to compute
$P = a_1 \times a_2 \times \cdots \times a_n$
where $a_1, a_2, \dots, a_n$ are the elements of the sequence.
The input consists of multiple test cases. For each test case, the first line contains an integer N — the number of elements in the sequence, followed by a line with N integers. For each test case you should output a single line, indicating the product of the given numbers.
Note: The resulting product may be very large. Make sure to use appropriate data types or libraries if needed.
inputFormat
The input is read from stdin and has the following format:
- The first line contains an integer T, the number of test cases.
- For each test case:
- The first line contains an integer N, representing the number of elements in the sequence.
- The next line contains N space-separated integers.
outputFormat
For each test case, output a single line to stdout containing the product of the N numbers.
## sample2
4
1 2 3 4
3
1 5 2
24
10
</p>