結果
問題 | No.2451 Redistribute Integers |
ユーザー |
|
提出日時 | 2023-09-02 12:33:10 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 232 ms / 2,000 ms |
コード長 | 359 bytes |
コンパイル時間 | 307 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 154,220 KB |
最終ジャッジ日時 | 2024-06-11 11:06:51 |
合計ジャッジ時間 | 3,636 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 |
ソースコード
import sys read = sys.stdin.read readline = sys.stdin.readline readlines = sys.stdin.readlines N, *A = map(int, read().split()) sm = sum(A) if sm % N: print('No') sys.exit() num = sm // N c1 = 0 c2 = 0 for i in range(1, N): if abs(A[i] - A[i - 1]) % N == 0: continue else: print('No') break else: print('Yes')