結果

問題 No.2451 Redistribute Integers
ユーザー ああいいああいい
提出日時 2023-10-21 23:06:42
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 264 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 81,548 KB
実行使用メモリ 153,480 KB
最終ジャッジ日時 2023-10-21 23:06:47
合計ジャッジ時間 3,725 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,360 KB
testcase_01 AC 35 ms
53,360 KB
testcase_02 AC 35 ms
53,360 KB
testcase_03 AC 36 ms
53,360 KB
testcase_04 AC 165 ms
153,248 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 33 ms
53,344 KB
testcase_08 AC 129 ms
145,832 KB
testcase_09 AC 35 ms
53,344 KB
testcase_10 AC 35 ms
53,344 KB
testcase_11 AC 35 ms
53,344 KB
testcase_12 WA -
testcase_13 AC 137 ms
153,396 KB
testcase_14 AC 143 ms
140,816 KB
testcase_15 AC 100 ms
108,060 KB
testcase_16 AC 98 ms
102,816 KB
testcase_17 WA -
testcase_18 AC 136 ms
153,456 KB
testcase_19 AC 47 ms
70,232 KB
testcase_20 AC 124 ms
134,288 KB
testcase_21 AC 148 ms
153,480 KB
権限があれば一括ダウンロードができます

ソースコード

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