結果

問題 No.406 鴨等間隔の法則
ユーザー 👑 rin204rin204
提出日時 2020-06-09 20:26:56
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 88 ms / 2,000 ms
コード長 219 bytes
コンパイル時間 370 ms
コンパイル使用メモリ 10,656 KB
実行使用メモリ 18,920 KB
最終ジャッジ日時 2023-08-30 20:36:30
合計ジャッジ時間 3,619 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
12,632 KB
testcase_01 AC 15 ms
7,816 KB
testcase_02 AC 15 ms
7,864 KB
testcase_03 AC 14 ms
7,948 KB
testcase_04 AC 63 ms
17,972 KB
testcase_05 AC 31 ms
11,564 KB
testcase_06 AC 33 ms
11,920 KB
testcase_07 AC 32 ms
11,972 KB
testcase_08 AC 63 ms
18,332 KB
testcase_09 AC 67 ms
18,776 KB
testcase_10 AC 35 ms
12,248 KB
testcase_11 AC 56 ms
16,472 KB
testcase_12 AC 41 ms
13,452 KB
testcase_13 AC 39 ms
12,980 KB
testcase_14 AC 76 ms
17,160 KB
testcase_15 AC 16 ms
8,732 KB
testcase_16 AC 18 ms
8,824 KB
testcase_17 AC 17 ms
8,628 KB
testcase_18 AC 17 ms
8,780 KB
testcase_19 AC 21 ms
8,992 KB
testcase_20 AC 22 ms
9,440 KB
testcase_21 AC 21 ms
9,364 KB
testcase_22 AC 29 ms
10,424 KB
testcase_23 AC 42 ms
13,784 KB
testcase_24 AC 67 ms
15,876 KB
testcase_25 AC 69 ms
18,812 KB
testcase_26 AC 88 ms
18,804 KB
testcase_27 AC 47 ms
18,920 KB
testcase_28 AC 47 ms
18,800 KB
testcase_29 AC 88 ms
18,868 KB
testcase_30 AC 87 ms
18,724 KB
testcase_31 AC 66 ms
18,484 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
x = list(map(int, input().split()))
x.sort()
w = x[1] - x[0]
before = x[1]
for num in x[2:]:
    if w != num - before or w == 0:
        print("NO")
        break
    before = num
else:
    print("YES")
0