結果

問題 No.99 ジャンピング駒
ユーザー tnodinotnodino
提出日時 2022-02-23 19:54:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 71 ms / 5,000 ms
コード長 166 bytes
コンパイル時間 342 ms
コンパイル使用メモリ 10,680 KB
実行使用メモリ 18,876 KB
最終ジャッジ日時 2023-09-14 12:57:46
合計ジャッジ時間 1,811 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
18,876 KB
testcase_01 AC 68 ms
18,836 KB
testcase_02 AC 68 ms
18,708 KB
testcase_03 AC 68 ms
18,704 KB
testcase_04 AC 67 ms
18,800 KB
testcase_05 AC 68 ms
18,740 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
X = list(map(int,input().split()))
P = 0
Q = 0
for i in range(N):
    if X[i] % 2:
        P += 1
    else:
        Q += 1
print(N - (min(P, Q) * 2))
0