結果

問題 No.406 鴨等間隔の法則
ユーザー eitaho
提出日時 2016-08-07 02:58:12
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 108 ms / 2,000 ms
コード長 163 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,604 KB
最終ジャッジ日時 2024-07-07 11:38:44
合計ジャッジ時間 3,590 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = sorted(map(int, input().split()))
diff = [b - a for a, b in zip(A[:-1], A[1:])]
print("YES" if diff[0] > 0 and len(set(diff)) == 1 else "NO")
0