結果

問題 No.406 鴨等間隔の法則
ユーザー rpy3cpprpy3cpp
提出日時 2016-08-05 22:29:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 97 ms / 2,000 ms
コード長 203 bytes
コンパイル時間 125 ms
コンパイル使用メモリ 10,520 KB
実行使用メモリ 18,972 KB
最終ジャッジ日時 2023-09-21 17:42:28
合計ジャッジ時間 3,075 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
12,596 KB
testcase_01 AC 15 ms
7,852 KB
testcase_02 AC 16 ms
7,912 KB
testcase_03 AC 15 ms
7,912 KB
testcase_04 AC 64 ms
17,912 KB
testcase_05 AC 32 ms
11,464 KB
testcase_06 AC 33 ms
11,872 KB
testcase_07 AC 34 ms
11,948 KB
testcase_08 AC 63 ms
18,428 KB
testcase_09 AC 69 ms
18,744 KB
testcase_10 AC 35 ms
12,356 KB
testcase_11 AC 56 ms
16,544 KB
testcase_12 AC 41 ms
13,476 KB
testcase_13 AC 39 ms
12,908 KB
testcase_14 AC 82 ms
17,156 KB
testcase_15 AC 17 ms
8,800 KB
testcase_16 AC 19 ms
8,868 KB
testcase_17 AC 17 ms
8,560 KB
testcase_18 AC 18 ms
8,796 KB
testcase_19 AC 21 ms
9,016 KB
testcase_20 AC 24 ms
9,396 KB
testcase_21 AC 21 ms
9,412 KB
testcase_22 AC 31 ms
10,476 KB
testcase_23 AC 43 ms
13,820 KB
testcase_24 AC 71 ms
15,820 KB
testcase_25 AC 69 ms
18,808 KB
testcase_26 AC 95 ms
18,944 KB
testcase_27 AC 48 ms
18,880 KB
testcase_28 AC 48 ms
18,972 KB
testcase_29 AC 97 ms
18,900 KB
testcase_30 AC 94 ms
18,688 KB
testcase_31 AC 66 ms
18,636 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
xs = list(map(int, input().split()))
xs.sort()
d = xs[1] - xs[0]

for i in range(2, N):
    if xs[i] - xs[i - 1] != d or d == 0:
        print('NO')
        break
else:
    print('YES')
0