結果

問題 No.406 鴨等間隔の法則
ユーザー lhanlhan
提出日時 2018-02-24 23:05:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 173 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 21,868 KB
最終ジャッジ日時 2024-04-24 05:58:05
合計ジャッジ時間 3,848 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
15,404 KB
testcase_01 AC 30 ms
10,624 KB
testcase_02 AC 31 ms
10,752 KB
testcase_03 WA -
testcase_04 AC 91 ms
20,464 KB
testcase_05 AC 52 ms
14,452 KB
testcase_06 AC 54 ms
14,588 KB
testcase_07 AC 54 ms
14,768 KB
testcase_08 AC 88 ms
21,012 KB
testcase_09 AC 92 ms
21,536 KB
testcase_10 AC 55 ms
15,048 KB
testcase_11 AC 77 ms
19,064 KB
testcase_12 AC 58 ms
16,112 KB
testcase_13 AC 60 ms
15,736 KB
testcase_14 AC 100 ms
19,616 KB
testcase_15 WA -
testcase_16 AC 34 ms
11,648 KB
testcase_17 AC 34 ms
11,008 KB
testcase_18 AC 32 ms
11,520 KB
testcase_19 AC 37 ms
11,776 KB
testcase_20 AC 38 ms
12,032 KB
testcase_21 AC 36 ms
12,032 KB
testcase_22 AC 46 ms
13,188 KB
testcase_23 AC 62 ms
16,504 KB
testcase_24 AC 85 ms
18,676 KB
testcase_25 AC 92 ms
21,480 KB
testcase_26 AC 107 ms
21,860 KB
testcase_27 WA -
testcase_28 AC 72 ms
21,356 KB
testcase_29 AC 103 ms
21,724 KB
testcase_30 AC 103 ms
21,540 KB
testcase_31 AC 91 ms
21,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

ds = sorted([int(x) for x in input().split()])

d = ds[1] - ds[0]

if all(ds[i+1] - ds[i] == d for i in range(n-1)):
    print('YES')
else:
    print('NO')
0