結果

問題 No.99 ジャンピング駒
ユーザー ch1channnch1channn
提出日時 2022-12-16 16:42:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 67 ms / 5,000 ms
コード長 387 bytes
コンパイル時間 229 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 84,480 KB
最終ジャッジ日時 2024-04-27 17:33:03
合計ジャッジ時間 1,208 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
84,480 KB
testcase_01 AC 67 ms
84,096 KB
testcase_02 AC 65 ms
84,352 KB
testcase_03 AC 65 ms
83,840 KB
testcase_04 AC 63 ms
83,712 KB
testcase_05 AC 66 ms
83,072 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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))
0