結果

問題 No.406 鴨等間隔の法則
ユーザー shamioshamio
提出日時 2020-02-07 09:03:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 204 bytes
コンパイル時間 71 ms
コンパイル使用メモリ 10,652 KB
実行使用メモリ 18,820 KB
最終ジャッジ日時 2023-09-21 19:12:49
合計ジャッジ時間 2,992 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
12,504 KB
testcase_01 AC 15 ms
7,788 KB
testcase_02 AC 15 ms
7,844 KB
testcase_03 AC 16 ms
7,776 KB
testcase_04 AC 68 ms
17,852 KB
testcase_05 AC 33 ms
11,600 KB
testcase_06 AC 34 ms
12,020 KB
testcase_07 AC 35 ms
11,904 KB
testcase_08 AC 65 ms
18,264 KB
testcase_09 AC 71 ms
18,724 KB
testcase_10 AC 35 ms
12,316 KB
testcase_11 AC 57 ms
16,524 KB
testcase_12 AC 41 ms
13,420 KB
testcase_13 AC 39 ms
13,020 KB
testcase_14 AC 82 ms
17,152 KB
testcase_15 AC 17 ms
8,704 KB
testcase_16 AC 19 ms
8,800 KB
testcase_17 AC 17 ms
8,540 KB
testcase_18 AC 18 ms
8,720 KB
testcase_19 AC 21 ms
9,104 KB
testcase_20 AC 23 ms
9,472 KB
testcase_21 AC 21 ms
9,280 KB
testcase_22 AC 32 ms
10,536 KB
testcase_23 AC 43 ms
13,796 KB
testcase_24 AC 74 ms
15,868 KB
testcase_25 AC 70 ms
18,792 KB
testcase_26 AC 94 ms
18,744 KB
testcase_27 AC 48 ms
18,800 KB
testcase_28 AC 47 ms
18,820 KB
testcase_29 AC 101 ms
18,812 KB
testcase_30 AC 94 ms
18,712 KB
testcase_31 AC 68 ms
18,656 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

x.sort()
diff = x[0] - x[1]
ans = "YES"
for e1, e2 in zip(x, x[1:]):
    if e1 == e2 or e1 - e2 != diff:
        ans = "NO"
        break

print(ans)
0