結果

問題 No.406 鴨等間隔の法則
ユーザー ixmelixmel
提出日時 2017-03-30 18:13:08
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 109 ms / 2,000 ms
コード長 150 bytes
コンパイル時間 70 ms
コンパイル使用メモリ 10,632 KB
実行使用メモリ 18,928 KB
最終ジャッジ日時 2023-09-21 18:25:05
合計ジャッジ時間 3,074 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
12,540 KB
testcase_01 AC 14 ms
7,796 KB
testcase_02 AC 15 ms
7,976 KB
testcase_03 AC 15 ms
8,148 KB
testcase_04 AC 61 ms
17,824 KB
testcase_05 AC 32 ms
11,476 KB
testcase_06 AC 32 ms
11,952 KB
testcase_07 AC 33 ms
11,968 KB
testcase_08 AC 61 ms
18,348 KB
testcase_09 AC 66 ms
18,812 KB
testcase_10 AC 35 ms
12,300 KB
testcase_11 AC 54 ms
16,536 KB
testcase_12 AC 39 ms
13,400 KB
testcase_13 AC 38 ms
12,996 KB
testcase_14 AC 94 ms
17,176 KB
testcase_15 AC 16 ms
8,660 KB
testcase_16 AC 18 ms
8,856 KB
testcase_17 AC 16 ms
8,472 KB
testcase_18 AC 17 ms
8,936 KB
testcase_19 AC 22 ms
9,064 KB
testcase_20 AC 25 ms
9,520 KB
testcase_21 AC 20 ms
9,276 KB
testcase_22 AC 35 ms
10,436 KB
testcase_23 AC 41 ms
13,792 KB
testcase_24 AC 81 ms
15,860 KB
testcase_25 AC 67 ms
18,844 KB
testcase_26 AC 107 ms
18,928 KB
testcase_27 AC 46 ms
18,724 KB
testcase_28 AC 45 ms
18,908 KB
testcase_29 AC 109 ms
18,848 KB
testcase_30 AC 107 ms
18,764 KB
testcase_31 AC 63 ms
18,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=sorted(map(int,input().split()))
for i in range(n-1):
	if a[i]==a[i+1] or a[1]-a[0]!=a[i+1]-a[i]:
		print("NO")
		exit()
print("YES")
0