結果
| 問題 | No.1586 Equal Array |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-08-25 01:48:48 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 266 bytes |
| 記録 | |
| コンパイル時間 | 494 ms |
| コンパイル使用メモリ | 81,688 KB |
| 実行使用メモリ | 88,284 KB |
| 最終ジャッジ日時 | 2026-09-23 08:52:28 |
| 合計ジャッジ時間 | 3,340 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 20 |
ソースコード
#!/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()