結果
| 問題 |
No.99 ジャンピング駒
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-17 14:47:58 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 67 ms / 5,000 ms |
| コード長 | 332 bytes |
| コンパイル時間 | 84 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 21,740 KB |
| 最終ジャッジ日時 | 2024-11-25 08:50:32 |
| 合計ジャッジ時間 | 1,458 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
def main():
N = int(input())
nums = map(int, input().split())
odd_count = 0
even_count = 0
for num in list(nums):
if num % 2 == 0:
even_count += 1
else:
odd_count += 1
distance = odd_count - even_count
print(abs(distance))
if __name__ == '__main__':
main()