結果

問題 No.99 ジャンピング駒
ユーザー zyxwzyxw
提出日時 2020-10-16 15:38:11
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 66 ms / 5,000 ms
コード長 176 bytes
コンパイル時間 317 ms
コンパイル使用メモリ 10,724 KB
実行使用メモリ 18,960 KB
最終ジャッジ日時 2023-09-28 02:01:15
合計ジャッジ時間 1,435 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
18,828 KB
testcase_01 AC 66 ms
18,880 KB
testcase_02 AC 61 ms
18,796 KB
testcase_03 AC 63 ms
18,956 KB
testcase_04 AC 63 ms
18,960 KB
testcase_05 AC 63 ms
18,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
data=[int(s) for s in input().split()]
g=0
k=0
for i in range(n):
    if data[i]%2==0:
        g+=1
    else:
        k+=1
import math
print(int(math.fabs(g-k)))
0