結果

問題 No.2451 Redistribute Integers
ユーザー ああいい
提出日時 2023-10-21 23:06:42
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 264 bytes
コンパイル時間 210 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 153,700 KB
最終ジャッジ日時 2024-06-11 11:08:41
合計ジャッジ時間 3,224 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
a = list(map(int,input().split()))

if sum(a) % N == 0:
	if N % 2 == 0:
		o = 0
		e = 0
		for i in a:
			if i % 2 == 0:
				e += 1
			else:
				o += 1
		if o * e == 0:
			print('Yes')
		else:
			print('No')
	else:
		print('Yes')
else:
	print('No')
0