結果

問題 No.406 鴨等間隔の法則
ユーザー Luoto-greenLuoto-green
提出日時 2017-07-27 20:05:34
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 85 ms / 2,000 ms
コード長 157 bytes
コンパイル時間 67 ms
コンパイル使用メモリ 10,600 KB
実行使用メモリ 18,984 KB
最終ジャッジ日時 2023-09-21 18:33:18
合計ジャッジ時間 3,014 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
13,692 KB
testcase_01 AC 14 ms
7,984 KB
testcase_02 AC 14 ms
7,856 KB
testcase_03 AC 15 ms
7,892 KB
testcase_04 AC 76 ms
18,040 KB
testcase_05 AC 37 ms
13,392 KB
testcase_06 AC 39 ms
13,496 KB
testcase_07 AC 39 ms
13,532 KB
testcase_08 AC 79 ms
18,328 KB
testcase_09 AC 81 ms
18,824 KB
testcase_10 AC 41 ms
13,876 KB
testcase_11 AC 66 ms
16,444 KB
testcase_12 AC 48 ms
14,012 KB
testcase_13 AC 45 ms
13,808 KB
testcase_14 AC 68 ms
17,216 KB
testcase_15 AC 17 ms
8,836 KB
testcase_16 AC 19 ms
9,452 KB
testcase_17 AC 16 ms
8,800 KB
testcase_18 AC 18 ms
9,568 KB
testcase_19 AC 19 ms
9,064 KB
testcase_20 AC 22 ms
10,068 KB
testcase_21 AC 23 ms
10,352 KB
testcase_22 AC 29 ms
11,076 KB
testcase_23 AC 50 ms
14,568 KB
testcase_24 AC 60 ms
15,996 KB
testcase_25 AC 84 ms
18,844 KB
testcase_26 AC 80 ms
18,884 KB
testcase_27 AC 56 ms
18,888 KB
testcase_28 AC 61 ms
18,812 KB
testcase_29 AC 85 ms
18,984 KB
testcase_30 AC 83 ms
18,700 KB
testcase_31 AC 82 ms
18,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = sorted(map(int,input().split()))
x = [xi - xj for xi, xj in zip(A[:-1], A[1:])]
s = set(x)
print(["NO","YES"][len(s)==1 and 0 not in s])
0