結果

問題 No.406 鴨等間隔の法則
ユーザー matriematrie
提出日時 2020-11-28 04:31:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 176 bytes
コンパイル時間 388 ms
コンパイル使用メモリ 10,668 KB
実行使用メモリ 22,388 KB
最終ジャッジ日時 2023-10-09 23:27:33
合計ジャッジ時間 4,523 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
15,212 KB
testcase_01 AC 15 ms
7,952 KB
testcase_02 AC 16 ms
7,776 KB
testcase_03 AC 16 ms
7,820 KB
testcase_04 AC 117 ms
22,216 KB
testcase_05 AC 50 ms
15,296 KB
testcase_06 AC 52 ms
15,364 KB
testcase_07 AC 53 ms
15,104 KB
testcase_08 AC 121 ms
22,032 KB
testcase_09 AC 133 ms
22,360 KB
testcase_10 AC 55 ms
15,116 KB
testcase_11 AC 97 ms
17,756 KB
testcase_12 AC 67 ms
15,564 KB
testcase_13 AC 61 ms
15,352 KB
testcase_14 AC 105 ms
21,256 KB
testcase_15 AC 19 ms
8,776 KB
testcase_16 AC 23 ms
9,408 KB
testcase_17 AC 19 ms
8,648 KB
testcase_18 AC 21 ms
9,512 KB
testcase_19 AC 23 ms
9,540 KB
testcase_20 AC 26 ms
10,088 KB
testcase_21 AC 27 ms
10,532 KB
testcase_22 AC 36 ms
13,476 KB
testcase_23 AC 73 ms
15,780 KB
testcase_24 AC 89 ms
16,840 KB
testcase_25 AC 133 ms
22,336 KB
testcase_26 AC 117 ms
21,764 KB
testcase_27 AC 75 ms
18,904 KB
testcase_28 AC 89 ms
22,388 KB
testcase_29 AC 117 ms
21,884 KB
testcase_30 AC 116 ms
21,632 KB
testcase_31 AC 131 ms
21,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
l = sorted(list(map(int, input().split())))
d = [0]*(N-1)

for i in range(N-1):
	d[i] = l[i+1]-l[i]
print("YES" if len(set(l))!=1 and len(set(d))==1 else "NO")
0