結果

問題 No.406 鴨等間隔の法則
ユーザー akitsugu777akitsugu777
提出日時 2019-10-01 16:37:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 111 ms / 2,000 ms
コード長 167 bytes
コンパイル時間 70 ms
コンパイル使用メモリ 10,492 KB
実行使用メモリ 18,860 KB
最終ジャッジ日時 2023-09-21 19:08:10
合計ジャッジ時間 3,431 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
13,356 KB
testcase_01 AC 15 ms
7,788 KB
testcase_02 AC 15 ms
7,936 KB
testcase_03 AC 14 ms
7,752 KB
testcase_04 AC 96 ms
17,948 KB
testcase_05 AC 45 ms
13,028 KB
testcase_06 AC 47 ms
13,172 KB
testcase_07 AC 48 ms
12,948 KB
testcase_08 AC 98 ms
18,396 KB
testcase_09 AC 109 ms
18,860 KB
testcase_10 AC 51 ms
13,256 KB
testcase_11 AC 86 ms
16,352 KB
testcase_12 AC 61 ms
13,564 KB
testcase_13 AC 57 ms
13,320 KB
testcase_14 AC 90 ms
17,084 KB
testcase_15 AC 18 ms
8,604 KB
testcase_16 AC 22 ms
9,496 KB
testcase_17 AC 18 ms
8,592 KB
testcase_18 AC 21 ms
9,604 KB
testcase_19 AC 22 ms
9,024 KB
testcase_20 AC 24 ms
9,380 KB
testcase_21 AC 27 ms
10,352 KB
testcase_22 AC 33 ms
10,372 KB
testcase_23 AC 63 ms
13,848 KB
testcase_24 AC 76 ms
15,820 KB
testcase_25 AC 111 ms
18,784 KB
testcase_26 AC 104 ms
18,748 KB
testcase_27 AC 77 ms
18,812 KB
testcase_28 AC 83 ms
18,784 KB
testcase_29 AC 103 ms
18,780 KB
testcase_30 AC 102 ms
18,668 KB
testcase_31 AC 106 ms
18,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
x = sorted(map(int, input().split()))

L = []
for i in range(N-1):
    L += [x[i+1] - x[i]]
L = set(L)

print(['NO', 'YES'][len(L) == 1 and L != {0}])
0