結果

問題 No.406 鴨等間隔の法則
ユーザー y_nakamura_CC2y_nakamura_CC2
提出日時 2018-03-24 23:56:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 85 ms / 2,000 ms
コード長 168 bytes
コンパイル時間 71 ms
コンパイル使用メモリ 10,580 KB
実行使用メモリ 18,980 KB
最終ジャッジ日時 2023-09-21 18:52:00
合計ジャッジ時間 3,004 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
13,348 KB
testcase_01 AC 14 ms
7,904 KB
testcase_02 AC 15 ms
7,832 KB
testcase_03 AC 14 ms
7,824 KB
testcase_04 AC 78 ms
18,044 KB
testcase_05 AC 38 ms
13,036 KB
testcase_06 AC 39 ms
13,096 KB
testcase_07 AC 39 ms
13,348 KB
testcase_08 AC 81 ms
18,456 KB
testcase_09 AC 84 ms
18,852 KB
testcase_10 AC 42 ms
13,464 KB
testcase_11 AC 68 ms
16,532 KB
testcase_12 AC 48 ms
13,572 KB
testcase_13 AC 46 ms
13,256 KB
testcase_14 AC 72 ms
17,124 KB
testcase_15 AC 18 ms
8,828 KB
testcase_16 AC 19 ms
9,456 KB
testcase_17 AC 16 ms
8,684 KB
testcase_18 AC 18 ms
9,492 KB
testcase_19 AC 19 ms
9,024 KB
testcase_20 AC 22 ms
9,484 KB
testcase_21 AC 23 ms
10,404 KB
testcase_22 AC 28 ms
10,776 KB
testcase_23 AC 51 ms
13,660 KB
testcase_24 AC 62 ms
15,868 KB
testcase_25 AC 85 ms
18,956 KB
testcase_26 AC 81 ms
18,980 KB
testcase_27 AC 59 ms
18,812 KB
testcase_28 AC 63 ms
18,796 KB
testcase_29 AC 81 ms
18,848 KB
testcase_30 AC 80 ms
18,732 KB
testcase_31 AC 84 ms
18,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
X = sorted([int(x) for x in input().split()])
diff = [X[i+1] - X[i] for i in range(len(X)-1)]

print(("NO","YES")[len(set(diff))==1 and sum(diff)!=0])
0