-Code
from math import ceil
t = int(input())
nums = list(map(int, input().split()))
even, odd = 0, 0
for n in nums:
if n % 2 != 0:
odd += 1
else:
even += 1
print(1 if odd == ceil(t / 2) and even == t // 2 else 0)
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬] 27866번 문자와 문자열 (0) | 2023.04.04 |
---|---|
[백준/파이썬] 15001번 Frog Leaps (0) | 2023.04.02 |
[백준/파이썬] 24569번 Fergusonball Ratings (0) | 2023.03.31 |
[백준/파이썬] 24603번 Scaling Recipe (0) | 2023.03.30 |
[백준/파이썬] 25813번 Changing Strings (0) | 2023.03.29 |