結果

問題 No.99 ジャンピング駒
ユーザー turner18_jpturner18_jp
提出日時 2017-12-19 06:47:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 262 bytes
コンパイル時間 108 ms
コンパイル使用メモリ 10,752 KB
実行使用メモリ 19,340 KB
最終ジャッジ日時 2023-08-22 19:25:10
合計ジャッジ時間 1,561 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
x = list(map(int, input().split()))
x = sorted(x) 
odd = 0
even = 0
count = 0
print(len(x))
for i in range(n):
  if abs(i) % 2 == 0:
    even += 1
  else:
    odd += 1

if odd <= even:
  count = odd * 2
else:
  count = even * 2

print(n - count)
0