結果

問題 No.406 鴨等間隔の法則
ユーザー Furu MFuru M
提出日時 2021-03-22 23:16:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 96 ms / 2,000 ms
コード長 140 bytes
コンパイル時間 202 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 21,724 KB
最終ジャッジ日時 2024-11-24 12:29:43
合計ジャッジ時間 4,098 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
15,404 KB
testcase_01 AC 30 ms
10,496 KB
testcase_02 AC 30 ms
10,496 KB
testcase_03 AC 30 ms
10,368 KB
testcase_04 AC 88 ms
20,176 KB
testcase_05 AC 50 ms
14,324 KB
testcase_06 AC 51 ms
14,456 KB
testcase_07 AC 51 ms
15,148 KB
testcase_08 AC 87 ms
20,748 KB
testcase_09 AC 94 ms
21,400 KB
testcase_10 AC 54 ms
14,784 KB
testcase_11 AC 79 ms
18,680 KB
testcase_12 AC 61 ms
15,940 KB
testcase_13 AC 58 ms
15,476 KB
testcase_14 AC 85 ms
19,356 KB
testcase_15 AC 33 ms
11,008 KB
testcase_16 AC 33 ms
11,264 KB
testcase_17 AC 32 ms
10,752 KB
testcase_18 AC 33 ms
11,264 KB
testcase_19 AC 35 ms
11,392 KB
testcase_20 AC 37 ms
12,032 KB
testcase_21 AC 37 ms
12,032 KB
testcase_22 AC 43 ms
13,056 KB
testcase_23 AC 62 ms
16,496 KB
testcase_24 AC 79 ms
18,540 KB
testcase_25 AC 95 ms
21,224 KB
testcase_26 AC 95 ms
21,592 KB
testcase_27 AC 64 ms
21,468 KB
testcase_28 AC 70 ms
21,212 KB
testcase_29 AC 96 ms
21,724 KB
testcase_30 AC 93 ms
21,468 KB
testcase_31 AC 90 ms
20,892 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