結果

問題 No.99 ジャンピング駒
ユーザー soupesuteakasoupesuteaka
提出日時 2016-03-03 18:14:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 89 ms / 5,000 ms
コード長 305 bytes
コンパイル時間 120 ms
コンパイル使用メモリ 11,868 KB
実行使用メモリ 20,956 KB
最終ジャッジ日時 2023-10-24 19:41:16
合計ジャッジ時間 1,325 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
20,956 KB
testcase_01 AC 86 ms
20,956 KB
testcase_02 AC 86 ms
20,956 KB
testcase_03 AC 85 ms
20,956 KB
testcase_04 AC 89 ms
20,956 KB
testcase_05 AC 85 ms
20,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding: UTF-8

import sys
import re
import itertools
from math import sqrt
from collections import deque

### defs ###

### main ###
N  = int(sys.stdin.readline())
X = list(map(int, sys.stdin.readline().split()))
print(N-2*min(len(list(filter(lambda x:x%2==0,X))), len(list(filter(lambda x:x%2==1,X)))))
0