#CCBCHBAHAI0000165. Kiểm tra IQ (IQ test)
Kiểm tra IQ (IQ test)
IQ test
Source: Codeforces
Version: Phuoc Hung OJ Extended
Problem
Among positive integers, exactly one differs from all the others in parity: either one is odd and all others are even, or one is even and all others are odd.
Print the 1-based position of that element.
Input
- Line 1: integer .
- Line 2: integers.
Output
Print the 1-based position of the parity outlier.
Subtask
Subtask 1 (100 points): ; ; exactly one element differs in parity.
Example
Input
5
2 4 7 8 10
Output
3
Explanation
Only is odd, and it is at position .