#C7494. Determine if the Product of Array Elements is Even or Odd
Determine if the Product of Array Elements is Even or Odd
Determine if the Product of Array Elements is Even or Odd
Given an array of integers, your task is to determine whether the product of its elements is even or odd.
If any number in the array is even, then the product is even; otherwise, it is odd. Formally, if \(P = \prod_{i=1}^{N} a_i\) and there exists any \(a_i\) such that \(a_i \bmod 2 = 0\), then \(P\) is even; if no such \(a_i\) exists, then \(P\) is odd.
inputFormat
The first line of the input contains an integer \(N\) representing the number of elements in the array. The second line contains \(N\) space-separated integers representing the elements of the array.
outputFormat
Output a single line containing the string "Even" if the product of the array elements is even, otherwise output "Odd".
## sample4
3 5 7 9
Odd