結果

問題 No.406 鴨等間隔の法則
ユーザー hiro1729
提出日時 2024-09-09 19:50:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 96 ms / 2,000 ms
コード長 160 bytes
コンパイル時間 393 ms
コンパイル使用メモリ 82,620 KB
実行使用メモリ 103,632 KB
最終ジャッジ日時 2024-09-09 19:50:43
合計ジャッジ時間 4,542 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
x = list(map(int, input().split()))
x.sort()
print("YES" if len(set(x)) > 1 and len(set(x[i + 1] - x[i] for i in range(N - 1))) == 1 else "NO")
0