結果

問題 No.406 鴨等間隔の法則
ユーザー pofpof
提出日時 2019-07-01 00:31:19
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 210 bytes
コンパイル時間 142 ms
コンパイル使用メモリ 10,636 KB
実行使用メモリ 19,148 KB
最終ジャッジ日時 2023-09-21 19:03:28
合計ジャッジ時間 2,941 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
13,492 KB
testcase_01 AC 15 ms
7,816 KB
testcase_02 AC 15 ms
7,896 KB
testcase_03 AC 15 ms
7,940 KB
testcase_04 AC 76 ms
18,012 KB
testcase_05 AC 38 ms
13,044 KB
testcase_06 AC 39 ms
13,000 KB
testcase_07 AC 39 ms
13,152 KB
testcase_08 AC 76 ms
18,468 KB
testcase_09 AC 83 ms
18,744 KB
testcase_10 AC 41 ms
13,284 KB
testcase_11 AC 68 ms
16,516 KB
testcase_12 AC 48 ms
13,432 KB
testcase_13 AC 45 ms
13,180 KB
testcase_14 AC 70 ms
17,108 KB
testcase_15 AC 17 ms
8,520 KB
testcase_16 AC 20 ms
9,532 KB
testcase_17 AC 17 ms
8,556 KB
testcase_18 AC 19 ms
9,596 KB
testcase_19 AC 20 ms
9,080 KB
testcase_20 AC 22 ms
9,312 KB
testcase_21 AC 24 ms
9,964 KB
testcase_22 AC 29 ms
10,392 KB
testcase_23 AC 50 ms
13,876 KB
testcase_24 AC 60 ms
16,100 KB
testcase_25 AC 84 ms
18,896 KB
testcase_26 AC 78 ms
19,148 KB
testcase_27 AC 54 ms
18,964 KB
testcase_28 AC 61 ms
18,884 KB
testcase_29 AC 79 ms
19,016 KB
testcase_30 AC 76 ms
18,872 KB
testcase_31 AC 81 ms
18,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
x = list(map(int,input().split()))
x.sort()

a = [x[i+1]-x[i] for i in range(n-1)]
if a[0] == 0:
    print("NO")
else:
    if len(set(a))==1:
        print("YES")
    else:
        print("NO")
0