結果

問題 No.99 ジャンピング駒
ユーザー MarioMario
提出日時 2018-05-12 00:32:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 65 ms / 5,000 ms
コード長 155 bytes
コンパイル時間 103 ms
コンパイル使用メモリ 10,516 KB
実行使用メモリ 16,192 KB
最終ジャッジ日時 2023-09-10 18:09:58
合計ジャッジ時間 1,223 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
16,144 KB
testcase_01 AC 65 ms
16,108 KB
testcase_02 AC 63 ms
16,176 KB
testcase_03 AC 61 ms
16,124 KB
testcase_04 AC 62 ms
16,192 KB
testcase_05 AC 63 ms
16,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
xs = map(int, input().split())
co, ce = 0, 0
for x in xs:
    if x % 2 == 0:
        ce += 1
    else:
        co +=1

print(abs(co - ce))
0