結果

問題 No.406 鴨等間隔の法則
ユーザー jamadjamad
提出日時 2017-07-23 16:30:19
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 82 ms / 2,000 ms
コード長 139 bytes
コンパイル時間 80 ms
コンパイル使用メモリ 10,660 KB
実行使用メモリ 18,968 KB
最終ジャッジ日時 2023-09-21 18:33:26
合計ジャッジ時間 2,904 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
13,428 KB
testcase_01 AC 15 ms
7,984 KB
testcase_02 AC 15 ms
7,892 KB
testcase_03 AC 15 ms
7,852 KB
testcase_04 AC 76 ms
17,872 KB
testcase_05 AC 37 ms
13,136 KB
testcase_06 AC 39 ms
13,324 KB
testcase_07 AC 39 ms
12,996 KB
testcase_08 AC 74 ms
18,356 KB
testcase_09 AC 82 ms
18,792 KB
testcase_10 AC 41 ms
13,160 KB
testcase_11 AC 66 ms
16,484 KB
testcase_12 AC 48 ms
13,444 KB
testcase_13 AC 46 ms
13,292 KB
testcase_14 AC 69 ms
17,128 KB
testcase_15 AC 17 ms
8,700 KB
testcase_16 AC 19 ms
9,692 KB
testcase_17 AC 18 ms
8,640 KB
testcase_18 AC 19 ms
9,584 KB
testcase_19 AC 19 ms
9,076 KB
testcase_20 AC 22 ms
9,824 KB
testcase_21 AC 23 ms
10,516 KB
testcase_22 AC 29 ms
10,400 KB
testcase_23 AC 50 ms
13,900 KB
testcase_24 AC 59 ms
15,836 KB
testcase_25 AC 82 ms
18,812 KB
testcase_26 AC 76 ms
18,956 KB
testcase_27 AC 55 ms
18,968 KB
testcase_28 AC 59 ms
18,888 KB
testcase_29 AC 77 ms
18,960 KB
testcase_30 AC 75 ms
18,696 KB
testcase_31 AC 80 ms
18,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

i=input
N=int(i())
X=sorted(map(int,i().split()))
Y=list(set([X[i+1]-X[i] for i in range(N-1)]))
print(('NO','YES')[Y[0]!=0 and len(Y)==1])
0