結果

問題 No.99 ジャンピング駒
ユーザー yuppe19 😺yuppe19 😺
提出日時 2015-04-26 14:17:33
言語 Python2
(2.7.18)
結果
AC  
実行時間 75 ms / 5,000 ms
コード長 165 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 6,696 KB
実行使用メモリ 14,616 KB
最終ジャッジ日時 2023-09-18 11:45:58
合計ジャッジ時間 1,488 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
14,512 KB
testcase_01 AC 75 ms
14,436 KB
testcase_02 AC 75 ms
14,512 KB
testcase_03 AC 73 ms
14,508 KB
testcase_04 AC 73 ms
14,616 KB
testcase_05 AC 73 ms
14,436 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python
n = int(raw_input())
xs = map(int, raw_input().split())
p = len(filter(lambda e: e&1, xs))
q = n - p
print reduce(lambda a, b: b-a, sorted((p, q)))
0