結果

問題 No.99 ジャンピング駒
ユーザー lam6er
提出日時 2025-03-20 20:29:30
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 288 bytes
コンパイル時間 331 ms
コンパイル使用メモリ 82,400 KB
実行使用メモリ 86,232 KB
最終ジャッジ日時 2025-03-20 20:30:24
合計ジャッジ時間 1,795 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
x = list(map(int, input().split()))

even = 0
odd = 0

for num in x:
    if num % 2 == 0:
        even += 1
    else:
        odd += 1

pairs = min(even, odd)
remain_even = even - pairs
remain_odd = odd - pairs

answer = (remain_even % 2) + (remain_odd % 2)
print(answer)
0