結果

問題 No.99 ジャンピング駒
ユーザー titiatitia
提出日時 2022-01-16 00:13:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 57 ms / 5,000 ms
コード長 147 bytes
コンパイル時間 475 ms
コンパイル使用メモリ 10,656 KB
実行使用メモリ 19,008 KB
最終ジャッジ日時 2023-08-14 10:52:23
合計ジャッジ時間 1,405 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
18,900 KB
testcase_01 AC 55 ms
18,844 KB
testcase_02 AC 56 ms
18,888 KB
testcase_03 AC 54 ms
18,912 KB
testcase_04 AC 55 ms
18,968 KB
testcase_05 AC 56 ms
19,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
X=list(map(int,input().split()))

A=0
B=0

for x in X:
    if x%2==0:
        A+=1
    else:
        B+=1

print(max(A,B)-min(A,B))
0