結果

問題 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  
実行時間 117 ms / 2,000 ms
コード長 168 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 21,472 KB
最終ジャッジ日時 2024-07-07 12:27:51
合計ジャッジ時間 3,327 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
15,020 KB
testcase_01 AC 26 ms
10,496 KB
testcase_02 AC 26 ms
10,496 KB
testcase_03 AC 29 ms
10,624 KB
testcase_04 AC 106 ms
20,316 KB
testcase_05 AC 55 ms
15,092 KB
testcase_06 AC 57 ms
14,332 KB
testcase_07 AC 57 ms
15,640 KB
testcase_08 AC 99 ms
20,628 KB
testcase_09 AC 103 ms
21,024 KB
testcase_10 AC 60 ms
15,220 KB
testcase_11 AC 83 ms
18,940 KB
testcase_12 AC 67 ms
16,004 KB
testcase_13 AC 69 ms
15,776 KB
testcase_14 AC 95 ms
19,360 KB
testcase_15 AC 30 ms
10,880 KB
testcase_16 AC 32 ms
12,032 KB
testcase_17 AC 29 ms
11,136 KB
testcase_18 AC 32 ms
12,160 KB
testcase_19 AC 34 ms
11,520 KB
testcase_20 AC 35 ms
11,776 KB
testcase_21 AC 37 ms
12,416 KB
testcase_22 AC 43 ms
13,240 KB
testcase_23 AC 71 ms
16,416 KB
testcase_24 AC 85 ms
18,292 KB
testcase_25 AC 115 ms
21,092 KB
testcase_26 AC 109 ms
21,344 KB
testcase_27 AC 87 ms
21,348 KB
testcase_28 AC 91 ms
21,100 KB
testcase_29 AC 117 ms
21,472 KB
testcase_30 AC 107 ms
21,472 KB
testcase_31 AC 107 ms
20,896 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