結果

問題 No.99 ジャンピング駒
ユーザー ゆるくゆるく
提出日時 2014-12-09 23:47:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 78 ms / 5,000 ms
コード長 344 bytes
コンパイル時間 341 ms
コンパイル使用メモリ 10,640 KB
実行使用メモリ 18,436 KB
最終ジャッジ日時 2023-09-02 12:23:49
合計ジャッジ時間 1,516 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import sys
#sys.setrecursionlimit(n)
import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

n = int(input())
a = deque(map(lambda x:int(x) % 2, input().split()))

c = a.count(0)
d = a.count(1)

print(abs(c-d))
0