#K86067. Product of Positive Integers
Product of Positive Integers
Product of Positive Integers
Given an array of integers, compute the product of all positive integers in the array. Formally, if the array is denoted by \(a_1, a_2, \dots, a_n\), compute \(\prod_{i: a_i>0} a_i\). If there are no positive integers in the array, the result is defined as 1.
You need to read the input from standard input (stdin) and write the result to standard output (stdout).
inputFormat
The first line contains an integer \(n\) representing the number of elements in the array. The second line contains \(n\) space-separated integers.
outputFormat
Output a single integer: the product of all positive integers in the array. If there are no positive integers, output 1.
## sample4
1 -4 7 12
84
</p>