結果

問題 No.406 鴨等間隔の法則
ユーザー netyo715netyo715
提出日時 2021-06-28 11:20:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 85 ms / 2,000 ms
コード長 212 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 10,524 KB
実行使用メモリ 21,600 KB
最終ジャッジ日時 2023-09-07 18:20:24
合計ジャッジ時間 2,770 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
14,948 KB
testcase_01 AC 15 ms
7,892 KB
testcase_02 AC 15 ms
7,848 KB
testcase_03 AC 15 ms
8,100 KB
testcase_04 AC 52 ms
20,940 KB
testcase_05 AC 29 ms
14,172 KB
testcase_06 AC 30 ms
14,500 KB
testcase_07 AC 29 ms
14,616 KB
testcase_08 AC 52 ms
21,600 KB
testcase_09 AC 54 ms
21,068 KB
testcase_10 AC 31 ms
15,124 KB
testcase_11 AC 47 ms
16,588 KB
testcase_12 AC 35 ms
14,896 KB
testcase_13 AC 33 ms
14,668 KB
testcase_14 AC 76 ms
20,152 KB
testcase_15 AC 17 ms
8,752 KB
testcase_16 AC 21 ms
9,656 KB
testcase_17 AC 17 ms
8,740 KB
testcase_18 AC 21 ms
9,592 KB
testcase_19 AC 20 ms
9,544 KB
testcase_20 AC 22 ms
9,944 KB
testcase_21 AC 23 ms
10,512 KB
testcase_22 AC 31 ms
12,804 KB
testcase_23 AC 34 ms
15,576 KB
testcase_24 AC 62 ms
16,168 KB
testcase_25 AC 57 ms
20,980 KB
testcase_26 AC 83 ms
21,224 KB
testcase_27 AC 46 ms
19,032 KB
testcase_28 AC 55 ms
21,156 KB
testcase_29 AC 85 ms
21,116 KB
testcase_30 AC 85 ms
20,900 KB
testcase_31 AC 55 ms
19,596 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
X = list(map(int, input().split()))
if len(X) != len(set(X)):
    print("NO")
    exit()
X.sort()
y = [X[i+1]-X[i] for i in range(N-1)]
if len(set(y)) != 1:
    print("NO")
else:
    print("YES")
0