#C6877. Longest Even Subarray
Longest Even Subarray
Longest Even Subarray
You are given an array of integers. Your task is to find the length of the longest contiguous subarray that consists entirely of even numbers. If there are no even numbers in the array, output 0.
Recall that an integer \( n \) is even if \( n \bmod 2 = 0 \).
inputFormat
The first line contains an integer \( n \) (1 ≤ \( n \) ≤ 105), 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 integer, which is the maximum length of a contiguous subarray consisting only of even numbers.
## sample4
2 4 6 8
4
</p>