結果

問題 No.406 鴨等間隔の法則
ユーザー Yuhel TanakaYuhel Tanaka
提出日時 2018-10-04 14:12:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 103 ms / 2,000 ms
コード長 156 bytes
コンパイル時間 856 ms
コンパイル使用メモリ 10,696 KB
実行使用メモリ 21,852 KB
最終ジャッジ日時 2023-09-21 18:54:13
合計ジャッジ時間 3,326 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
13,588 KB
testcase_01 AC 16 ms
7,780 KB
testcase_02 AC 16 ms
7,784 KB
testcase_03 AC 16 ms
7,828 KB
testcase_04 AC 81 ms
18,020 KB
testcase_05 AC 39 ms
12,512 KB
testcase_06 AC 41 ms
12,756 KB
testcase_07 AC 42 ms
12,980 KB
testcase_08 AC 81 ms
18,472 KB
testcase_09 AC 89 ms
18,752 KB
testcase_10 AC 44 ms
13,536 KB
testcase_11 AC 70 ms
16,488 KB
testcase_12 AC 50 ms
13,748 KB
testcase_13 AC 49 ms
13,240 KB
testcase_14 AC 92 ms
20,852 KB
testcase_15 AC 18 ms
8,800 KB
testcase_16 AC 20 ms
9,532 KB
testcase_17 AC 18 ms
8,768 KB
testcase_18 AC 20 ms
9,644 KB
testcase_19 AC 22 ms
9,732 KB
testcase_20 AC 25 ms
9,972 KB
testcase_21 AC 25 ms
10,240 KB
testcase_22 AC 34 ms
13,036 KB
testcase_23 AC 53 ms
13,964 KB
testcase_24 AC 68 ms
16,496 KB
testcase_25 AC 90 ms
18,928 KB
testcase_26 AC 94 ms
21,852 KB
testcase_27 AC 61 ms
18,964 KB
testcase_28 AC 62 ms
18,956 KB
testcase_29 AC 103 ms
21,800 KB
testcase_30 AC 103 ms
21,672 KB
testcase_31 AC 88 ms
18,596 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
l=sorted(map(int,input().split()))
if len(set(map(lambda x,y:x-y,l[1:],l[:-1])))==1 and sorted(set(l))==l:
  print("YES")
else:
  print("NO")
0