結果

問題 No.2451 Redistribute Integers
ユーザー 👑 timitimi
提出日時 2023-09-01 21:32:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 270 ms / 2,000 ms
コード長 186 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 87,232 KB
実行使用メモリ 174,620 KB
最終ジャッジ日時 2023-09-01 21:33:02
合計ジャッジ時間 5,179 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,300 KB
testcase_01 AC 73 ms
71,580 KB
testcase_02 AC 73 ms
71,436 KB
testcase_03 AC 74 ms
71,176 KB
testcase_04 AC 219 ms
160,600 KB
testcase_05 AC 72 ms
71,476 KB
testcase_06 AC 73 ms
71,656 KB
testcase_07 AC 74 ms
71,180 KB
testcase_08 AC 165 ms
149,404 KB
testcase_09 AC 72 ms
71,476 KB
testcase_10 AC 73 ms
71,556 KB
testcase_11 AC 74 ms
71,440 KB
testcase_12 AC 169 ms
102,012 KB
testcase_13 AC 261 ms
174,620 KB
testcase_14 AC 269 ms
163,876 KB
testcase_15 AC 174 ms
115,352 KB
testcase_16 AC 132 ms
105,040 KB
testcase_17 AC 249 ms
135,932 KB
testcase_18 AC 238 ms
149,908 KB
testcase_19 AC 89 ms
80,692 KB
testcase_20 AC 185 ms
137,296 KB
testcase_21 AC 270 ms
165,408 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int, input().split()))
if sum(A)%N!=0:
  print('No')
  exit()

A=sorted(A)
for i in range(N-1):
  if (A[i+1]-A[i])%N!=0:
    print('No')
    exit()
print('Yes')
0