結果

問題 No.406 鴨等間隔の法則
ユーザー pluto77
提出日時 2016-08-14 17:07:00
言語 Python2
(2.7.18)
結果
AC  
実行時間 110 ms / 2,000 ms
コード長 223 bytes
コンパイル時間 271 ms
コンパイル使用メモリ 6,784 KB
実行使用メモリ 14,868 KB
最終ジャッジ日時 2024-07-07 11:38:31
合計ジャッジ時間 2,767 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding: utf-8
#yuki_406

n=int(raw_input())
x=map(int,raw_input().split())

x.sort()
d=x[1]-x[0]
res=1
for i in xrange(n-1):
 if (x[i+1]-x[i])!=d or x[i+1]==x[i]:
  res=0
  break

if res==1:
 print "YES"
else:
 print "NO"
0