結果

問題 No.2451 Redistribute Integers
ユーザー Akijin_007Akijin_007
提出日時 2023-09-01 21:35:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 198 ms / 2,000 ms
コード長 363 bytes
コンパイル時間 257 ms
コンパイル使用メモリ 87,248 KB
実行使用メモリ 174,704 KB
最終ジャッジ日時 2023-09-01 21:35:58
合計ジャッジ時間 4,326 ms
ジャッジサーバーID
(参考情報)
judge16 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,324 KB
testcase_01 AC 70 ms
71,324 KB
testcase_02 AC 68 ms
71,548 KB
testcase_03 AC 68 ms
71,336 KB
testcase_04 AC 197 ms
155,452 KB
testcase_05 AC 72 ms
71,600 KB
testcase_06 AC 69 ms
71,268 KB
testcase_07 AC 73 ms
71,320 KB
testcase_08 AC 163 ms
149,132 KB
testcase_09 AC 69 ms
71,496 KB
testcase_10 AC 71 ms
71,320 KB
testcase_11 AC 70 ms
71,272 KB
testcase_12 AC 112 ms
101,868 KB
testcase_13 AC 194 ms
174,704 KB
testcase_14 AC 198 ms
153,804 KB
testcase_15 AC 136 ms
111,284 KB
testcase_16 AC 130 ms
105,024 KB
testcase_17 AC 156 ms
129,588 KB
testcase_18 AC 178 ms
142,368 KB
testcase_19 AC 81 ms
80,136 KB
testcase_20 AC 160 ms
136,972 KB
testcase_21 AC 185 ms
163,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#int(input())
#map(int, input().split())
#list(map(int, input().split()))

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

s = sum(A)

if s % N != 0:
    print("No")
else:
    t = min(A)
    f = 1
    for i in range(N):
        if (A[i] - t) % N != 0:
            f = 0
            break
    if f == 1:
        print("Yes")
    else:
        print("No")



0