結果

問題 No.406 鴨等間隔の法則
ユーザー Luoto-green
提出日時 2017-07-27 20:05:34
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 157 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 21,608 KB
最終ジャッジ日時 2024-07-07 12:09:28
合計ジャッジ時間 3,237 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = sorted(map(int,input().split()))
x = [xi - xj for xi, xj in zip(A[:-1], A[1:])]
s = set(x)
print(["NO","YES"][len(s)==1 and 0 not in s])
0