結果

問題 No.406 鴨等間隔の法則
ユーザー pluto77pluto77
提出日時 2016-08-14 17:07:00
言語 Python2
(2.7.18)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 223 bytes
コンパイル時間 793 ms
コンパイル使用メモリ 6,520 KB
実行使用メモリ 14,544 KB
最終ジャッジ日時 2023-09-21 18:02:46
合計ジャッジ時間 3,850 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
9,252 KB
testcase_01 AC 10 ms
5,928 KB
testcase_02 AC 11 ms
5,864 KB
testcase_03 AC 10 ms
5,908 KB
testcase_04 AC 88 ms
13,660 KB
testcase_05 AC 37 ms
8,740 KB
testcase_06 AC 39 ms
8,828 KB
testcase_07 AC 40 ms
8,944 KB
testcase_08 AC 88 ms
13,540 KB
testcase_09 AC 95 ms
14,380 KB
testcase_10 AC 43 ms
9,368 KB
testcase_11 AC 75 ms
12,332 KB
testcase_12 AC 52 ms
10,012 KB
testcase_13 AC 48 ms
9,884 KB
testcase_14 AC 102 ms
12,952 KB
testcase_15 AC 13 ms
6,140 KB
testcase_16 AC 15 ms
6,312 KB
testcase_17 AC 13 ms
6,160 KB
testcase_18 AC 14 ms
6,588 KB
testcase_19 AC 18 ms
6,436 KB
testcase_20 AC 21 ms
6,672 KB
testcase_21 AC 19 ms
6,780 KB
testcase_22 AC 33 ms
7,800 KB
testcase_23 AC 54 ms
10,400 KB
testcase_24 AC 89 ms
12,164 KB
testcase_25 AC 95 ms
14,448 KB
testcase_26 AC 120 ms
14,436 KB
testcase_27 AC 58 ms
14,544 KB
testcase_28 AC 59 ms
14,508 KB
testcase_29 AC 121 ms
14,516 KB
testcase_30 AC 120 ms
14,288 KB
testcase_31 AC 93 ms
14,112 KB
権限があれば一括ダウンロードができます

ソースコード

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