Find the Odd Parity

In this list, almost all numbers have the same parity: they are either even or odd. Write find_outlier, which finds the only number with the opposite parity and returns it. The list integers always contains at least three numbers, so you can determine which parity is the majority.

Примеры

Ввод
[2, 4, 0, 100, 4, 11, 2602, 36]
Вывод
11
Ввод
[160, 3, 1719, 19, 11, 13, -21]
Вывод
160
Ввод
[1, 1, 0, 1, 1]
Вывод
0

Нужно реализовать

def find_outlier(integers: list[int]) -> int:

Теги

arraymath
PostgreSQLv16

Tukaj bo rezultat izvajanja kode

Visible tests
1
Input
[2,4,0,100,4,11,2602,36]
Expected11
2
Input
[160,3,1719,19,11,13,-21]
Expected160
3
Input
[1,1,0,1,1]
Expected0
4
Input
[2,6,8,10,3]
Expected3
5
Input
[-7,-3,-2,-5]
Expected-2
6
Input
[2,4,0,100,4,11,2602,36,2]
Expected11
Focus radio
Paused · SomaFM · Fluid