結果

問題 No.406 鴨等間隔の法則
ユーザー reforefo2reforefo2
提出日時 2020-05-08 14:43:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 99 ms / 2,000 ms
コード長 259 bytes
コンパイル時間 138 ms
コンパイル使用メモリ 10,708 KB
実行使用メモリ 19,076 KB
最終ジャッジ日時 2023-09-16 08:27:03
合計ジャッジ時間 4,275 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
13,380 KB
testcase_01 AC 15 ms
7,756 KB
testcase_02 AC 15 ms
7,788 KB
testcase_03 AC 15 ms
7,832 KB
testcase_04 AC 99 ms
17,892 KB
testcase_05 AC 43 ms
13,200 KB
testcase_06 AC 44 ms
13,268 KB
testcase_07 AC 44 ms
13,044 KB
testcase_08 AC 90 ms
18,408 KB
testcase_09 AC 98 ms
18,828 KB
testcase_10 AC 48 ms
13,364 KB
testcase_11 AC 79 ms
16,512 KB
testcase_12 AC 55 ms
13,492 KB
testcase_13 AC 53 ms
13,352 KB
testcase_14 AC 80 ms
17,088 KB
testcase_15 AC 19 ms
8,568 KB
testcase_16 AC 21 ms
9,516 KB
testcase_17 AC 18 ms
8,640 KB
testcase_18 AC 21 ms
9,608 KB
testcase_19 AC 21 ms
9,076 KB
testcase_20 AC 24 ms
9,328 KB
testcase_21 AC 25 ms
10,416 KB
testcase_22 AC 31 ms
10,556 KB
testcase_23 AC 58 ms
13,808 KB
testcase_24 AC 69 ms
15,804 KB
testcase_25 AC 98 ms
18,892 KB
testcase_26 AC 93 ms
19,076 KB
testcase_27 AC 68 ms
19,076 KB
testcase_28 AC 74 ms
18,944 KB
testcase_29 AC 93 ms
19,076 KB
testcase_30 AC 92 ms
18,988 KB
testcase_31 AC 95 ms
18,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
List = list(map(int,input().split()))
List.sort()
Delta = []

for i in range(N-1):
    Delta.append(List[i+1]-List[i])
Delta_set = set(Delta)
if 0 in Delta_set:
    print("NO")
elif len(Delta_set) == 1:
    print("YES")
else:
    print("NO")
0