結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
14,844 KB
testcase_01 AC 15 ms
7,776 KB
testcase_02 AC 15 ms
7,940 KB
testcase_03 AC 14 ms
7,804 KB
testcase_04 AC 71 ms
20,888 KB
testcase_05 AC 35 ms
14,108 KB
testcase_06 AC 34 ms
14,132 KB
testcase_07 AC 35 ms
14,324 KB
testcase_08 AC 75 ms
20,840 KB
testcase_09 AC 75 ms
20,968 KB
testcase_10 AC 38 ms
14,840 KB
testcase_11 AC 58 ms
16,632 KB
testcase_12 AC 43 ms
14,952 KB
testcase_13 AC 42 ms
14,500 KB
testcase_14 AC 73 ms
20,236 KB
testcase_15 AC 16 ms
8,844 KB
testcase_16 AC 19 ms
9,448 KB
testcase_17 AC 16 ms
8,520 KB
testcase_18 AC 20 ms
9,556 KB
testcase_19 AC 20 ms
9,604 KB
testcase_20 AC 22 ms
9,976 KB
testcase_21 AC 24 ms
10,352 KB
testcase_22 AC 31 ms
13,012 KB
testcase_23 AC 46 ms
15,476 KB
testcase_24 AC 63 ms
16,172 KB
testcase_25 AC 77 ms
21,028 KB
testcase_26 AC 82 ms
21,160 KB
testcase_27 AC 47 ms
19,032 KB
testcase_28 AC 55 ms
21,028 KB
testcase_29 AC 83 ms
21,112 KB
testcase_30 AC 83 ms
20,976 KB
testcase_31 AC 73 ms
20,480 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
x = tuple(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