結果

問題 No.406 鴨等間隔の法則
ユーザー sickofrainsickofrain
提出日時 2016-10-21 15:17:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 100 ms / 2,000 ms
コード長 211 bytes
コンパイル時間 466 ms
コンパイル使用メモリ 10,664 KB
実行使用メモリ 18,912 KB
最終ジャッジ日時 2023-09-21 18:16:39
合計ジャッジ時間 3,079 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
12,556 KB
testcase_01 AC 16 ms
7,724 KB
testcase_02 AC 16 ms
8,196 KB
testcase_03 AC 16 ms
8,072 KB
testcase_04 AC 64 ms
17,864 KB
testcase_05 AC 32 ms
11,696 KB
testcase_06 AC 33 ms
11,976 KB
testcase_07 AC 34 ms
11,984 KB
testcase_08 AC 64 ms
18,324 KB
testcase_09 AC 70 ms
18,712 KB
testcase_10 AC 37 ms
12,636 KB
testcase_11 AC 57 ms
16,544 KB
testcase_12 AC 42 ms
13,544 KB
testcase_13 AC 40 ms
13,044 KB
testcase_14 AC 83 ms
17,056 KB
testcase_15 AC 17 ms
8,792 KB
testcase_16 AC 18 ms
9,008 KB
testcase_17 AC 17 ms
8,428 KB
testcase_18 AC 18 ms
8,868 KB
testcase_19 AC 21 ms
9,100 KB
testcase_20 AC 24 ms
9,412 KB
testcase_21 AC 21 ms
9,556 KB
testcase_22 AC 31 ms
10,548 KB
testcase_23 AC 43 ms
13,740 KB
testcase_24 AC 70 ms
15,812 KB
testcase_25 AC 69 ms
18,912 KB
testcase_26 AC 100 ms
18,792 KB
testcase_27 AC 48 ms
18,808 KB
testcase_28 AC 48 ms
18,804 KB
testcase_29 AC 98 ms
18,812 KB
testcase_30 AC 92 ms
18,788 KB
testcase_31 AC 66 ms
18,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
x = sorted(list(map(int,input().split())))
k = x[1] - x[0]
if k == 0:
    print("NO")
    exit()
for i in range(1,N-1):
    if x[i+1] - x[i] != k:
        print("NO")
        exit()
print("YES")
0