結果

問題 No.99 ジャンピング駒
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2023-06-21 21:59:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 140 ms / 5,000 ms
コード長 280 bytes
コンパイル時間 554 ms
コンパイル使用メモリ 87,112 KB
実行使用メモリ 93,976 KB
最終ジャッジ日時 2023-09-11 17:03:02
合計ジャッジ時間 2,259 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
93,488 KB
testcase_01 AC 140 ms
93,796 KB
testcase_02 AC 135 ms
93,788 KB
testcase_03 AC 132 ms
93,464 KB
testcase_04 AC 134 ms
93,976 KB
testcase_05 AC 135 ms
93,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
# input = sys.stdin.readline

N = int(input())
X = list(map(int,input().split()))
X = [x%2 for x in X]
C = Counter(X)
C[0] = C[0]
C[1] = C[1]
print(N - min(C.values())*2)
0