結果

問題 No.406 鴨等間隔の法則
ユーザー akitsugu777akitsugu777
提出日時 2021-02-03 15:17:19
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 141 bytes
コンパイル時間 625 ms
コンパイル使用メモリ 10,732 KB
実行使用メモリ 18,936 KB
最終ジャッジ日時 2023-09-12 13:10:43
合計ジャッジ時間 3,684 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
13,028 KB
testcase_01 AC 16 ms
7,832 KB
testcase_02 AC 15 ms
7,832 KB
testcase_03 AC 15 ms
7,788 KB
testcase_04 AC 76 ms
18,024 KB
testcase_05 AC 38 ms
12,392 KB
testcase_06 AC 38 ms
12,528 KB
testcase_07 AC 39 ms
12,460 KB
testcase_08 AC 78 ms
18,380 KB
testcase_09 AC 83 ms
18,780 KB
testcase_10 AC 42 ms
13,080 KB
testcase_11 AC 67 ms
16,492 KB
testcase_12 AC 49 ms
13,520 KB
testcase_13 AC 46 ms
12,924 KB
testcase_14 AC 70 ms
17,016 KB
testcase_15 AC 18 ms
8,748 KB
testcase_16 AC 20 ms
9,464 KB
testcase_17 AC 18 ms
8,660 KB
testcase_18 AC 19 ms
9,516 KB
testcase_19 AC 20 ms
9,044 KB
testcase_20 AC 22 ms
9,528 KB
testcase_21 AC 24 ms
10,216 KB
testcase_22 AC 28 ms
10,580 KB
testcase_23 AC 51 ms
13,736 KB
testcase_24 AC 61 ms
15,952 KB
testcase_25 AC 84 ms
18,880 KB
testcase_26 AC 81 ms
18,856 KB
testcase_27 AC 56 ms
18,848 KB
testcase_28 AC 59 ms
18,856 KB
testcase_29 AC 80 ms
18,936 KB
testcase_30 AC 79 ms
18,700 KB
testcase_31 AC 82 ms
18,616 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
X = sorted(map(int, input().split()))
L = {X[i+1] - X[i] for i in range(N-1)}
print('NO' if len(L) > 1 or 0 in L else 'YES')
0