結果

問題 No.406 鴨等間隔の法則
ユーザー picares9uepicares9ue
提出日時 2016-12-14 22:35:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 89 ms / 2,000 ms
コード長 274 bytes
コンパイル時間 439 ms
コンパイル使用メモリ 10,484 KB
実行使用メモリ 21,968 KB
最終ジャッジ日時 2023-09-21 18:20:32
合計ジャッジ時間 3,001 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
15,808 KB
testcase_01 AC 15 ms
7,792 KB
testcase_02 AC 15 ms
7,716 KB
testcase_03 AC 15 ms
7,780 KB
testcase_04 AC 84 ms
21,968 KB
testcase_05 AC 40 ms
14,964 KB
testcase_06 AC 41 ms
15,096 KB
testcase_07 AC 41 ms
15,200 KB
testcase_08 AC 82 ms
21,868 KB
testcase_09 AC 88 ms
21,824 KB
testcase_10 AC 44 ms
15,876 KB
testcase_11 AC 68 ms
17,248 KB
testcase_12 AC 51 ms
15,464 KB
testcase_13 AC 49 ms
15,612 KB
testcase_14 AC 71 ms
20,612 KB
testcase_15 AC 18 ms
8,784 KB
testcase_16 AC 21 ms
10,044 KB
testcase_17 AC 17 ms
8,836 KB
testcase_18 AC 19 ms
10,036 KB
testcase_19 AC 20 ms
9,696 KB
testcase_20 AC 22 ms
10,104 KB
testcase_21 AC 24 ms
10,696 KB
testcase_22 AC 30 ms
13,172 KB
testcase_23 AC 52 ms
15,748 KB
testcase_24 AC 59 ms
16,484 KB
testcase_25 AC 89 ms
21,852 KB
testcase_26 AC 80 ms
21,780 KB
testcase_27 AC 53 ms
19,036 KB
testcase_28 AC 64 ms
21,820 KB
testcase_29 AC 82 ms
21,792 KB
testcase_30 AC 82 ms
21,456 KB
testcase_31 AC 86 ms
21,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#ソートし忘れてた
#重複がある場合を考えてなかった
import operator
N, lis = int(input()), sorted([int(i) for i in input().split()])
sa = set(map(operator.sub, lis, lis[1:]))
if len(set(lis)) == N and len(sa) == 1:
    print("YES")
else:
    print("NO")
0