結果

問題 No.99 ジャンピング駒
ユーザー norioc
提出日時 2024-07-17 00:12:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 70 ms / 5,000 ms
コード長 179 bytes
コンパイル時間 558 ms
コンパイル使用メモリ 81,968 KB
実行使用メモリ 85,540 KB
最終ジャッジ日時 2024-07-17 00:12:51
合計ジャッジ時間 1,937 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
X = list(map(int, input().split()))

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

ans = abs(even - odd)
print(ans)
0