結果

問題 No.2451 Redistribute Integers
ユーザー detteiuu
提出日時 2024-12-22 06:36:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 278 ms / 2,000 ms
コード長 221 bytes
コンパイル時間 469 ms
コンパイル使用メモリ 82,572 KB
実行使用メモリ 181,668 KB
最終ジャッジ日時 2024-12-22 06:36:51
合計ジャッジ時間 5,286 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

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

sumA = sum(A)
if sumA%N != 0:
    exit(print("No"))

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