#K56072. Product of Integers in a List
Product of Integers in a List
Product of Integers in a List
This problem requires you to compute the product of all integers in a given list. You are provided with an integer n representing the number of elements, followed by n integers. Your task is to multiply all the integers together and output the result.
The mathematical formulation of the task is:
[ \text{result} = \prod_{i=1}^{n} a_i ]
where \(a_i\) denotes the i-th integer in the list.
inputFormat
The input consists of two lines:
- The first line contains a single integer \(n\) (\(1 \leq n \leq 10^5\)), which is the number of integers.
- The second line contains \(n\) space-separated integers \(a_1, a_2, \ldots, a_n\) (each integer can be negative, zero, or positive).
outputFormat
Output a single integer, which is the product of all the given \(n\) integers. Note that the product may be negative.
## sample3
2 3 4
24