結果

問題 No.406 鴨等間隔の法則
ユーザー chakkuchakku
提出日時 2016-09-05 02:17:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 99 ms / 2,000 ms
コード長 192 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 10,592 KB
実行使用メモリ 19,088 KB
最終ジャッジ日時 2023-09-21 18:06:25
合計ジャッジ時間 3,204 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
12,456 KB
testcase_01 AC 15 ms
7,912 KB
testcase_02 AC 15 ms
7,760 KB
testcase_03 AC 15 ms
7,732 KB
testcase_04 AC 91 ms
18,020 KB
testcase_05 AC 40 ms
11,720 KB
testcase_06 AC 42 ms
11,844 KB
testcase_07 AC 43 ms
11,952 KB
testcase_08 AC 88 ms
18,316 KB
testcase_09 AC 97 ms
18,860 KB
testcase_10 AC 47 ms
12,472 KB
testcase_11 AC 80 ms
16,428 KB
testcase_12 AC 55 ms
13,432 KB
testcase_13 AC 50 ms
12,944 KB
testcase_14 AC 79 ms
17,072 KB
testcase_15 AC 18 ms
8,700 KB
testcase_16 AC 20 ms
9,012 KB
testcase_17 AC 18 ms
8,440 KB
testcase_18 AC 20 ms
8,708 KB
testcase_19 AC 21 ms
9,112 KB
testcase_20 AC 24 ms
9,396 KB
testcase_21 AC 24 ms
9,408 KB
testcase_22 AC 31 ms
10,456 KB
testcase_23 AC 55 ms
13,732 KB
testcase_24 AC 73 ms
15,868 KB
testcase_25 AC 99 ms
18,960 KB
testcase_26 AC 91 ms
19,032 KB
testcase_27 AC 67 ms
19,088 KB
testcase_28 AC 72 ms
18,856 KB
testcase_29 AC 91 ms
19,048 KB
testcase_30 AC 91 ms
18,848 KB
testcase_31 AC 92 ms
18,488 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
x = sorted(list(map(int,input().split())))
d = x[1]-x[0]
f = True
if d==0:
	f=False
for i in range(N-1):
	if x[i+1]-x[i]!=d:
		f=False

if f:
	print("YES")
else:
	print("NO")
0