結果

問題 No.406 鴨等間隔の法則
ユーザー MitI_7MitI_7
提出日時 2016-09-17 11:10:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 217 bytes
コンパイル時間 1,151 ms
コンパイル使用メモリ 10,604 KB
実行使用メモリ 21,812 KB
最終ジャッジ日時 2023-09-21 18:12:47
合計ジャッジ時間 3,071 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
15,276 KB
testcase_01 AC 16 ms
7,840 KB
testcase_02 AC 15 ms
7,800 KB
testcase_03 AC 15 ms
7,816 KB
testcase_04 AC 80 ms
20,868 KB
testcase_05 AC 37 ms
14,472 KB
testcase_06 AC 37 ms
14,308 KB
testcase_07 AC 37 ms
14,264 KB
testcase_08 AC 74 ms
21,000 KB
testcase_09 AC 80 ms
21,480 KB
testcase_10 AC 39 ms
15,108 KB
testcase_11 AC 61 ms
16,920 KB
testcase_12 AC 46 ms
14,628 KB
testcase_13 AC 44 ms
14,852 KB
testcase_14 AC 84 ms
20,364 KB
testcase_15 AC 17 ms
8,704 KB
testcase_16 AC 21 ms
9,384 KB
testcase_17 AC 18 ms
8,660 KB
testcase_18 AC 20 ms
9,628 KB
testcase_19 AC 22 ms
9,592 KB
testcase_20 AC 23 ms
9,912 KB
testcase_21 AC 24 ms
10,136 KB
testcase_22 AC 33 ms
13,096 KB
testcase_23 AC 48 ms
15,056 KB
testcase_24 AC 65 ms
15,868 KB
testcase_25 AC 81 ms
21,524 KB
testcase_26 AC 86 ms
21,812 KB
testcase_27 AC 49 ms
19,028 KB
testcase_28 AC 57 ms
21,196 KB
testcase_29 AC 90 ms
21,736 KB
testcase_30 AC 89 ms
21,568 KB
testcase_31 AC 77 ms
20,084 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
x = sorted(list(map(int, input().split())))

if len(set(x)) != n:
    print("NO")
else:
    if len(set([abs(i - j) for i, j in zip(x, x[1:])])) != 1:
        print("NO")
    else:
        print("YES")
0