結果

問題 No.99 ジャンピング駒
ユーザー HIROPON87069639HIROPON87069639
提出日時 2016-02-27 12:55:22
言語 Python2
(2.7.18)
結果
AC  
実行時間 82 ms / 5,000 ms
コード長 200 bytes
コンパイル時間 217 ms
コンパイル使用メモリ 7,100 KB
実行使用メモリ 15,120 KB
最終ジャッジ日時 2023-10-24 18:31:05
合計ジャッジ時間 1,512 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

# -*- coding: utf-8 -*-
N = input()
A = map(int, raw_input().split())
cnt1 = 0
cnt2 = 0
for i in range(0,N):
    if A[i] % 2 == 1:
        cnt1 += 1
    else:
        cnt2 += 1
print abs(cnt1 - cnt2)
0