結果

問題 No.99 ジャンピング駒
ユーザー convexineqconvexineq
提出日時 2020-12-03 07:38:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 107 ms / 5,000 ms
コード長 231 bytes
コンパイル時間 334 ms
コンパイル使用メモリ 87,268 KB
実行使用メモリ 92,736 KB
最終ジャッジ日時 2023-10-11 16:33:16
合計ジャッジ時間 1,784 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
92,736 KB
testcase_01 AC 107 ms
92,628 KB
testcase_02 AC 106 ms
92,628 KB
testcase_03 AC 106 ms
92,572 KB
testcase_04 AC 105 ms
92,396 KB
testcase_05 AC 103 ms
92,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!
import sys
read = sys.stdin.read
readline = sys.stdin.readline

n = int(readline())
*x, = map(int,readline().split())

ans = 0
for i in x:
    if i%2==0: ans += 1
    else: ans -= 1
print(abs(ans))
0