結果

問題 No.406 鴨等間隔の法則
ユーザー TakoKurageTakoKurage
提出日時 2020-02-06 22:55:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 163 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 10,536 KB
実行使用メモリ 18,880 KB
最終ジャッジ日時 2023-09-21 19:12:40
合計ジャッジ時間 3,111 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
12,608 KB
testcase_01 AC 17 ms
7,928 KB
testcase_02 AC 16 ms
7,832 KB
testcase_03 AC 16 ms
7,920 KB
testcase_04 AC 64 ms
17,952 KB
testcase_05 AC 33 ms
11,756 KB
testcase_06 AC 33 ms
11,992 KB
testcase_07 AC 34 ms
11,952 KB
testcase_08 AC 64 ms
18,620 KB
testcase_09 AC 69 ms
18,856 KB
testcase_10 AC 36 ms
12,580 KB
testcase_11 AC 58 ms
16,544 KB
testcase_12 AC 41 ms
13,592 KB
testcase_13 AC 40 ms
13,084 KB
testcase_14 AC 68 ms
17,028 KB
testcase_15 AC 17 ms
8,472 KB
testcase_16 AC 18 ms
8,896 KB
testcase_17 AC 18 ms
8,176 KB
testcase_18 AC 18 ms
8,896 KB
testcase_19 AC 20 ms
9,092 KB
testcase_20 AC 23 ms
9,420 KB
testcase_21 AC 22 ms
9,320 KB
testcase_22 AC 29 ms
10,428 KB
testcase_23 AC 43 ms
13,692 KB
testcase_24 AC 60 ms
15,928 KB
testcase_25 AC 69 ms
18,792 KB
testcase_26 AC 78 ms
18,880 KB
testcase_27 AC 46 ms
18,852 KB
testcase_28 AC 47 ms
18,784 KB
testcase_29 AC 79 ms
18,876 KB
testcase_30 AC 77 ms
18,764 KB
testcase_31 AC 66 ms
18,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, *X = map(int, open(0).read().split())

X.sort()

d = X[1] - X[0]
if d != 0 and all(b - a == d for a, b in zip(X, X[1:])):
    print("YES")
else:
    print("NO")
0