結果

問題 No.406 鴨等間隔の法則
ユーザー SchneeSchnee
提出日時 2021-12-16 16:03:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 92 ms / 2,000 ms
コード長 169 bytes
コンパイル時間 858 ms
コンパイル使用メモリ 10,564 KB
実行使用メモリ 21,488 KB
最終ジャッジ日時 2023-10-11 14:10:17
合計ジャッジ時間 4,605 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
14,936 KB
testcase_01 AC 16 ms
7,808 KB
testcase_02 AC 15 ms
7,892 KB
testcase_03 AC 15 ms
7,816 KB
testcase_04 AC 74 ms
21,080 KB
testcase_05 AC 37 ms
14,284 KB
testcase_06 AC 37 ms
14,628 KB
testcase_07 AC 38 ms
14,584 KB
testcase_08 AC 74 ms
21,488 KB
testcase_09 AC 79 ms
20,900 KB
testcase_10 AC 40 ms
14,964 KB
testcase_11 AC 63 ms
17,068 KB
testcase_12 AC 47 ms
14,948 KB
testcase_13 AC 45 ms
14,456 KB
testcase_14 AC 83 ms
20,228 KB
testcase_15 AC 18 ms
8,772 KB
testcase_16 AC 22 ms
9,608 KB
testcase_17 AC 18 ms
8,576 KB
testcase_18 AC 21 ms
9,628 KB
testcase_19 AC 21 ms
9,588 KB
testcase_20 AC 24 ms
9,952 KB
testcase_21 AC 26 ms
10,568 KB
testcase_22 AC 32 ms
12,776 KB
testcase_23 AC 48 ms
15,392 KB
testcase_24 AC 65 ms
16,496 KB
testcase_25 AC 81 ms
21,020 KB
testcase_26 AC 89 ms
20,980 KB
testcase_27 AC 50 ms
18,788 KB
testcase_28 AC 58 ms
21,140 KB
testcase_29 AC 92 ms
21,144 KB
testcase_30 AC 90 ms
20,876 KB
testcase_31 AC 78 ms
20,444 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
s=sorted(map(int,input().split()))
if n != len(set(s)):
    print("NO")
else:
    a=[s[i+1]-s[i]for i in range(n-1)]
    print("YNEOS"[len(set(a))!=1::2])
0