結果

問題 No.406 鴨等間隔の法則
ユーザー ヒッキープログラミングするスレヒッキープログラミングするスレ
提出日時 2016-08-05 22:38:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 224 bytes
コンパイル時間 110 ms
コンパイル使用メモリ 10,596 KB
実行使用メモリ 19,080 KB
最終ジャッジ日時 2023-09-21 17:45:40
合計ジャッジ時間 3,814 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
13,048 KB
testcase_01 AC 14 ms
7,868 KB
testcase_02 AC 16 ms
7,784 KB
testcase_03 AC 15 ms
7,868 KB
testcase_04 AC 94 ms
17,924 KB
testcase_05 AC 44 ms
12,804 KB
testcase_06 AC 47 ms
13,028 KB
testcase_07 AC 44 ms
13,044 KB
testcase_08 AC 93 ms
18,420 KB
testcase_09 AC 100 ms
18,840 KB
testcase_10 AC 48 ms
13,172 KB
testcase_11 AC 81 ms
16,464 KB
testcase_12 AC 57 ms
13,576 KB
testcase_13 AC 54 ms
13,292 KB
testcase_14 AC 71 ms
17,112 KB
testcase_15 AC 17 ms
8,960 KB
testcase_16 AC 19 ms
9,080 KB
testcase_17 AC 17 ms
8,400 KB
testcase_18 AC 19 ms
9,092 KB
testcase_19 AC 19 ms
9,164 KB
testcase_20 AC 21 ms
9,436 KB
testcase_21 AC 24 ms
9,968 KB
testcase_22 AC 28 ms
11,148 KB
testcase_23 AC 60 ms
13,788 KB
testcase_24 AC 63 ms
15,868 KB
testcase_25 AC 101 ms
18,856 KB
testcase_26 AC 81 ms
19,080 KB
testcase_27 AC 59 ms
19,000 KB
testcase_28 AC 80 ms
19,028 KB
testcase_29 AC 80 ms
18,996 KB
testcase_30 AC 79 ms
18,980 KB
testcase_31 AC 97 ms
18,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
x = list(map(int, input().strip().split(' ')))
x.sort()
h = []
for (u, v) in zip(x[0:n-1], x[1:n]):
    h.append(v - u)
h.sort()
if h[0] > 0 and h[0] == h[len(h) - 1]:
    print('YES')
else:
    print('NO')
0