Odd one out
Level A. Teaches count with a lambda, if as an expression and .items.
You are given n integers (3 ≤ n ≤ 100, each from 1 to 100). All of them have the same parity except exactly one. Print the 1-based position of the one that differs.
Input: n, then n integers. Output: one integer.
| Input | Output |
|---|---|
52 4 7 8 10 | 3 |
6 tests · Ctrl+Enter