#K83167. Longest Even Contiguous Subsequence
Longest Even Contiguous Subsequence
Longest Even Contiguous Subsequence
You are given a sequence of integers. Your task is to determine the length of the longest contiguous subsequence in which every number is even. A number is considered even if it satisfies the condition \(n \mod 2 = 0\).
If there are no even numbers, output 0.
inputFormat
The first line contains an integer \(n\) denoting the number of elements in the sequence. The second line contains \(n\) space-separated integers.
outputFormat
Output a single integer representing the length of the longest contiguous subsequence of even numbers.
## sample6
1 2 4 6 1 8
3