結果

問題 No.1586 Equal Array
ユーザー kept1994
提出日時 2021-08-25 01:49:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 64 ms / 1,000 ms
コード長 266 bytes
コンパイル時間 214 ms
コンパイル使用メモリ 82,120 KB
実行使用メモリ 85,372 KB
最終ジャッジ日時 2024-11-15 16:39:25
合計ジャッジ時間 2,303 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

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