結果
| 問題 |
No.99 ジャンピング駒
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-12-16 16:42:40 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 77 ms / 5,000 ms |
| コード長 | 387 bytes |
| コンパイル時間 | 315 ms |
| コンパイル使用メモリ | 82,376 KB |
| 実行使用メモリ | 84,224 KB |
| 最終ジャッジ日時 | 2024-11-15 21:39:25 |
| 合計ジャッジ時間 | 1,368 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
import sys
if sys.platform =='ios':
import clipboard
a=clipboard.get()
a = a.split('\n')
text = '\n'.join(a)
with open('input_file.txt','w') as f:
f.write(text)
sys.stdin = open('input_file.txt')
n = int(input())
x = list(map(int,input().split()))
even = 0
odd = 0
for i in x:
if i%2 == 0:
even += 1
else:
odd += 1
if even == odd:
print(0)
else:
print(abs(even-odd))