結果

問題 No.406 鴨等間隔の法則
ユーザー Furu MFuru M
提出日時 2021-03-22 23:16:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 140 bytes
コンパイル時間 111 ms
コンパイル使用メモリ 10,668 KB
実行使用メモリ 18,908 KB
最終ジャッジ日時 2023-08-16 02:57:07
合計ジャッジ時間 3,458 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
12,496 KB
testcase_01 AC 13 ms
7,852 KB
testcase_02 AC 13 ms
7,844 KB
testcase_03 AC 15 ms
7,800 KB
testcase_04 AC 60 ms
17,876 KB
testcase_05 AC 28 ms
12,300 KB
testcase_06 AC 30 ms
12,496 KB
testcase_07 AC 33 ms
12,480 KB
testcase_08 AC 65 ms
18,456 KB
testcase_09 AC 67 ms
18,852 KB
testcase_10 AC 32 ms
12,540 KB
testcase_11 AC 56 ms
16,516 KB
testcase_12 AC 39 ms
13,472 KB
testcase_13 AC 36 ms
13,020 KB
testcase_14 AC 54 ms
17,072 KB
testcase_15 AC 15 ms
8,712 KB
testcase_16 AC 16 ms
9,004 KB
testcase_17 AC 15 ms
8,268 KB
testcase_18 AC 16 ms
8,724 KB
testcase_19 AC 18 ms
9,108 KB
testcase_20 AC 21 ms
9,520 KB
testcase_21 AC 20 ms
9,868 KB
testcase_22 AC 24 ms
10,512 KB
testcase_23 AC 40 ms
13,708 KB
testcase_24 AC 53 ms
15,968 KB
testcase_25 AC 67 ms
18,908 KB
testcase_26 AC 69 ms
18,848 KB
testcase_27 AC 44 ms
18,840 KB
testcase_28 AC 47 ms
18,776 KB
testcase_29 AC 67 ms
18,816 KB
testcase_30 AC 66 ms
18,704 KB
testcase_31 AC 62 ms
18,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
X=sorted(map(int,input().split()))
A=0
if N>1:A=X[1]-X[0]
O='NO'
if A!=0 and X==list(range(X[0],X[0]+A*N,A)):O='YES'
print(O)
0