結果

問題 No.1586 Equal Array
ユーザー kept1994kept1994
提出日時 2021-08-25 01:49:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 99 ms / 1,000 ms
コード長 266 bytes
コンパイル時間 1,585 ms
コンパイル使用メモリ 86,592 KB
実行使用メモリ 92,272 KB
最終ジャッジ日時 2023-08-09 19:32:14
合計ジャッジ時間 4,672 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,276 KB
testcase_01 AC 71 ms
71,256 KB
testcase_02 AC 70 ms
71,416 KB
testcase_03 AC 71 ms
71,268 KB
testcase_04 AC 93 ms
90,184 KB
testcase_05 AC 93 ms
89,748 KB
testcase_06 AC 98 ms
91,876 KB
testcase_07 AC 97 ms
91,856 KB
testcase_08 AC 98 ms
91,800 KB
testcase_09 AC 98 ms
91,908 KB
testcase_10 AC 98 ms
92,052 KB
testcase_11 AC 72 ms
71,264 KB
testcase_12 AC 71 ms
71,456 KB
testcase_13 AC 98 ms
91,984 KB
testcase_14 AC 99 ms
91,780 KB
testcase_15 AC 99 ms
91,880 KB
testcase_16 AC 98 ms
91,860 KB
testcase_17 AC 71 ms
71,200 KB
testcase_18 AC 98 ms
91,892 KB
testcase_19 AC 99 ms
92,272 KB
testcase_20 AC 71 ms
71,432 KB
testcase_21 AC 71 ms
71,536 KB
testcase_22 AC 72 ms
71,196 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import sys

def main():
    N = int(input())
    A = list(map(int, input().split()))
    tot = 0
    for aa in A[1:]:
        tot += (aa - A[0]) % N
        tot %= N
    print("Yes" if tot == 0 else "No")

if __name__ == '__main__':
    main()
0