結果
問題 |
No.99 ジャンピング駒
|
ユーザー |
![]() |
提出日時 | 2017-12-19 06:47:43 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 262 bytes |
コンパイル時間 | 331 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 21,992 KB |
最終ジャッジ日時 | 2024-12-17 20:15:04 |
合計ジャッジ時間 | 1,943 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 6 |
ソースコード
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)