結果

問題 No.406 鴨等間隔の法則
ユーザー TawaraTawara
提出日時 2016-08-05 22:31:24
言語 Python2
(2.7.18)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 190 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 6,536 KB
実行使用メモリ 14,628 KB
最終ジャッジ日時 2023-09-21 17:42:38
合計ジャッジ時間 3,422 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
9,424 KB
testcase_01 AC 11 ms
5,964 KB
testcase_02 AC 11 ms
5,948 KB
testcase_03 AC 12 ms
5,948 KB
testcase_04 AC 95 ms
13,540 KB
testcase_05 AC 42 ms
8,592 KB
testcase_06 AC 41 ms
8,812 KB
testcase_07 AC 42 ms
9,020 KB
testcase_08 AC 91 ms
13,524 KB
testcase_09 AC 100 ms
14,568 KB
testcase_10 AC 46 ms
9,372 KB
testcase_11 AC 79 ms
12,304 KB
testcase_12 AC 54 ms
10,092 KB
testcase_13 AC 51 ms
9,960 KB
testcase_14 AC 104 ms
12,872 KB
testcase_15 AC 14 ms
6,332 KB
testcase_16 AC 17 ms
6,312 KB
testcase_17 AC 14 ms
6,144 KB
testcase_18 AC 16 ms
6,632 KB
testcase_19 AC 20 ms
6,456 KB
testcase_20 AC 23 ms
6,648 KB
testcase_21 AC 21 ms
6,820 KB
testcase_22 AC 34 ms
7,636 KB
testcase_23 AC 57 ms
10,256 KB
testcase_24 AC 91 ms
12,072 KB
testcase_25 AC 102 ms
14,628 KB
testcase_26 AC 126 ms
14,412 KB
testcase_27 AC 61 ms
14,592 KB
testcase_28 AC 62 ms
14,516 KB
testcase_29 AC 127 ms
14,448 KB
testcase_30 AC 123 ms
14,416 KB
testcase_31 AC 97 ms
14,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(raw_input())
x = map(int,raw_input().split())
x.sort()
d = x[1] - x[0]
for i in xrange(N-1):
	tmpd = x[i+1] - x[i]
	if tmpd == 0 or tmpd != d:
		print "NO"
		break
else:
	print "YES"
0