結果

問題 No.2451 Redistribute Integers
ユーザー MottchanMottchan
提出日時 2023-09-01 21:59:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 404 bytes
コンパイル時間 1,047 ms
コンパイル使用メモリ 86,924 KB
実行使用メモリ 174,468 KB
最終ジャッジ日時 2023-09-01 21:59:27
合計ジャッジ時間 4,563 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,428 KB
testcase_01 AC 74 ms
71,148 KB
testcase_02 AC 73 ms
71,120 KB
testcase_03 AC 80 ms
71,180 KB
testcase_04 AC 199 ms
154,224 KB
testcase_05 AC 73 ms
71,288 KB
testcase_06 AC 74 ms
71,400 KB
testcase_07 WA -
testcase_08 AC 171 ms
149,564 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 73 ms
71,064 KB
testcase_12 AC 134 ms
101,852 KB
testcase_13 WA -
testcase_14 AC 200 ms
154,204 KB
testcase_15 WA -
testcase_16 AC 138 ms
105,540 KB
testcase_17 AC 161 ms
129,820 KB
testcase_18 WA -
testcase_19 AC 89 ms
80,556 KB
testcase_20 AC 169 ms
137,252 KB
testcase_21 AC 189 ms
165,056 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
l = list(map(int,input().split()))
ok1=n%2
a=l[1]
if ok1:
    if sum(l)%n:ok1=0
    for i in range(n-1):
        a+=l[i]
        if not a%2:
            ok1=0
    if ok1:
        print('Yes')
    else:
        print('No')
else:
    if sum(l)%n:ok1=1
    for i in range(n-1):
        a+=l[i]
        if a%2:
            ok1=1
    if ok1:
        print('No')
    else:
        print('Yes')
0