結果

問題 No.406 鴨等間隔の法則
ユーザー えいじえいじ
提出日時 2023-10-08 10:38:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 208 bytes
コンパイル時間 232 ms
コンパイル使用メモリ 10,528 KB
実行使用メモリ 19,120 KB
最終ジャッジ日時 2023-10-08 10:38:10
合計ジャッジ時間 5,202 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
13,200 KB
testcase_01 AC 15 ms
7,820 KB
testcase_02 AC 15 ms
7,908 KB
testcase_03 AC 15 ms
7,964 KB
testcase_04 AC 98 ms
17,880 KB
testcase_05 AC 43 ms
13,232 KB
testcase_06 AC 44 ms
13,240 KB
testcase_07 AC 46 ms
13,244 KB
testcase_08 AC 93 ms
18,460 KB
testcase_09 AC 129 ms
18,868 KB
testcase_10 AC 48 ms
13,212 KB
testcase_11 AC 81 ms
16,568 KB
testcase_12 AC 58 ms
13,484 KB
testcase_13 AC 57 ms
13,500 KB
testcase_14 AC 89 ms
17,060 KB
testcase_15 AC 18 ms
8,708 KB
testcase_16 AC 21 ms
9,456 KB
testcase_17 AC 18 ms
8,544 KB
testcase_18 AC 21 ms
9,560 KB
testcase_19 AC 22 ms
8,992 KB
testcase_20 AC 25 ms
9,428 KB
testcase_21 AC 26 ms
10,540 KB
testcase_22 AC 33 ms
10,796 KB
testcase_23 AC 59 ms
13,768 KB
testcase_24 AC 72 ms
16,104 KB
testcase_25 AC 120 ms
18,904 KB
testcase_26 AC 99 ms
18,988 KB
testcase_27 AC 70 ms
19,108 KB
testcase_28 AC 77 ms
18,872 KB
testcase_29 AC 99 ms
19,120 KB
testcase_30 AC 99 ms
18,804 KB
testcase_31 AC 103 ms
18,560 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3

n = int(input())
x = sorted([int(x) for x in input().split()])
t = []
for i in range(len(x) - 1):
    t.append(x[i + 1] - x[i])
print("YES" if len(set(t)) == 1 and t[0] != 0 else "NO")
0