結果

問題 No.99 ジャンピング駒
ユーザー daku9640daku9640
提出日時 2016-10-10 06:09:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 74 ms / 5,000 ms
コード長 176 bytes
コンパイル時間 108 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,636 KB
最終ジャッジ日時 2024-05-01 18:49:56
合計ジャッジ時間 1,210 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

N = int(input())
X = list(map(int, input().split()))
g = sum([1 for x in X if x % 2 == 0])
k = N - g
if k == g:
    print(0)
elif k > g:
    print(k - g)
else:
    print(g - k)
0