結果

問題 No.406 鴨等間隔の法則
ユーザー r_yo6021r_yo6021
提出日時 2016-09-05 23:25:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 91 ms / 2,000 ms
コード長 196 bytes
コンパイル時間 161 ms
コンパイル使用メモリ 10,736 KB
実行使用メモリ 18,916 KB
最終ジャッジ日時 2023-09-21 18:06:58
合計ジャッジ時間 3,117 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
12,472 KB
testcase_01 AC 14 ms
7,808 KB
testcase_02 AC 14 ms
7,840 KB
testcase_03 AC 14 ms
7,936 KB
testcase_04 AC 64 ms
17,900 KB
testcase_05 AC 31 ms
11,884 KB
testcase_06 AC 31 ms
11,988 KB
testcase_07 AC 31 ms
12,204 KB
testcase_08 AC 59 ms
18,412 KB
testcase_09 AC 64 ms
18,868 KB
testcase_10 AC 34 ms
12,608 KB
testcase_11 AC 52 ms
16,472 KB
testcase_12 AC 39 ms
13,616 KB
testcase_13 AC 36 ms
12,964 KB
testcase_14 AC 76 ms
17,120 KB
testcase_15 AC 16 ms
8,776 KB
testcase_16 AC 17 ms
8,892 KB
testcase_17 AC 15 ms
8,272 KB
testcase_18 AC 16 ms
8,780 KB
testcase_19 AC 20 ms
9,060 KB
testcase_20 AC 22 ms
9,480 KB
testcase_21 AC 20 ms
9,464 KB
testcase_22 AC 29 ms
10,456 KB
testcase_23 AC 40 ms
13,644 KB
testcase_24 AC 68 ms
15,960 KB
testcase_25 AC 66 ms
18,836 KB
testcase_26 AC 90 ms
18,840 KB
testcase_27 AC 45 ms
18,916 KB
testcase_28 AC 46 ms
18,864 KB
testcase_29 AC 91 ms
18,868 KB
testcase_30 AC 90 ms
18,780 KB
testcase_31 AC 63 ms
18,512 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
L = sorted(list(map(int, input().split())))

d = L[1] - L[0]

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