結果

問題 No.2451 Redistribute Integers
ユーザー FromBooskaFromBooska
提出日時 2023-09-02 08:19:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 210 ms / 2,000 ms
コード長 366 bytes
コンパイル時間 770 ms
コンパイル使用メモリ 86,456 KB
実行使用メモリ 174,132 KB
最終ジャッジ日時 2023-09-02 08:19:41
合計ジャッジ時間 5,349 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,172 KB
testcase_01 AC 74 ms
71,396 KB
testcase_02 AC 74 ms
71,148 KB
testcase_03 AC 74 ms
71,248 KB
testcase_04 AC 208 ms
152,764 KB
testcase_05 AC 136 ms
71,176 KB
testcase_06 AC 74 ms
71,196 KB
testcase_07 AC 73 ms
71,256 KB
testcase_08 AC 169 ms
149,824 KB
testcase_09 AC 75 ms
71,396 KB
testcase_10 AC 73 ms
71,248 KB
testcase_11 AC 76 ms
71,076 KB
testcase_12 AC 113 ms
102,140 KB
testcase_13 AC 199 ms
174,132 KB
testcase_14 AC 206 ms
154,976 KB
testcase_15 AC 137 ms
111,292 KB
testcase_16 AC 136 ms
105,368 KB
testcase_17 AC 157 ms
129,912 KB
testcase_18 AC 210 ms
141,956 KB
testcase_19 AC 87 ms
80,624 KB
testcase_20 AC 166 ms
137,376 KB
testcase_21 AC 187 ms
163,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# あら、WAだった
# AiとAjの差はNである必要ある、操作によって差はN動くから
# を加えてみるか

N = int(input())
A = list(map(int, input().split()))
sumA = sum(A)
diff_test = True
for i in range(1, N):
    if (A[i]-A[i-1])%N != 0:
        diff_test = False
if sumA%N == 0 and diff_test == True:
    print('Yes')
else:
    print('No')
0