結果

問題 No.406 鴨等間隔の法則
ユーザー daku9640daku9640
提出日時 2018-03-20 00:09:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 154 bytes
コンパイル時間 122 ms
コンパイル使用メモリ 10,548 KB
実行使用メモリ 21,536 KB
最終ジャッジ日時 2023-09-21 18:46:16
合計ジャッジ時間 3,050 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
14,924 KB
testcase_01 AC 15 ms
7,904 KB
testcase_02 AC 15 ms
7,836 KB
testcase_03 AC 15 ms
7,824 KB
testcase_04 AC 75 ms
21,036 KB
testcase_05 AC 36 ms
14,152 KB
testcase_06 AC 37 ms
14,588 KB
testcase_07 AC 36 ms
14,596 KB
testcase_08 AC 72 ms
21,536 KB
testcase_09 AC 77 ms
21,016 KB
testcase_10 AC 40 ms
14,896 KB
testcase_11 AC 61 ms
16,996 KB
testcase_12 AC 45 ms
14,952 KB
testcase_13 AC 43 ms
14,548 KB
testcase_14 AC 76 ms
20,044 KB
testcase_15 AC 17 ms
8,824 KB
testcase_16 AC 20 ms
9,628 KB
testcase_17 AC 17 ms
8,620 KB
testcase_18 AC 19 ms
9,524 KB
testcase_19 AC 20 ms
9,632 KB
testcase_20 AC 22 ms
10,000 KB
testcase_21 AC 24 ms
10,360 KB
testcase_22 AC 31 ms
12,748 KB
testcase_23 AC 46 ms
15,372 KB
testcase_24 AC 63 ms
16,504 KB
testcase_25 AC 78 ms
21,088 KB
testcase_26 AC 84 ms
21,032 KB
testcase_27 AC 48 ms
18,976 KB
testcase_28 AC 56 ms
20,992 KB
testcase_29 AC 86 ms
21,280 KB
testcase_30 AC 84 ms
20,976 KB
testcase_31 AC 75 ms
20,468 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
x = sorted(map(int, input().split()))
print("YES" if len(set(x)) == n and len(set(x[i + 1] - x[i] for i in range(n - 1))) == 1 else "NO")
0