結果

問題 No.2451 Redistribute Integers
ユーザー lam6er
提出日時 2025-03-20 20:44:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 157 ms / 2,000 ms
コード長 241 bytes
コンパイル時間 143 ms
コンパイル使用メモリ 82,416 KB
実行使用メモリ 154,560 KB
最終ジャッジ日時 2025-03-20 20:44:35
合計ジャッジ時間 3,059 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
total = sum(a)

if total % n != 0:
    print("No")
else:
    mod_val = a[0] % n
    for num in a:
        if num % n != mod_val:
            print("No")
            exit()
    print("Yes")
0