結果

問題 No.406 鴨等間隔の法則
ユーザー picares9ue
提出日時 2016-12-14 22:35:44
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 107 ms / 2,000 ms
コード長 274 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 24,208 KB
最終ジャッジ日時 2024-07-07 11:56:06
合計ジャッジ時間 3,242 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

#ソートし忘れてた
#重複がある場合を考えてなかった
import operator
N, lis = int(input()), sorted([int(i) for i in input().split()])
sa = set(map(operator.sub, lis, lis[1:]))
if len(set(lis)) == N and len(sa) == 1:
    print("YES")
else:
    print("NO")
0