結果

問題 No.716 距離
ユーザー iad_2889iad_2889
提出日時 2019-04-27 14:56:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 397 bytes
コンパイル時間 548 ms
コンパイル使用メモリ 10,896 KB
実行使用メモリ 8,344 KB
最終ジャッジ日時 2023-08-18 16:05:23
合計ジャッジ時間 2,734 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,224 KB
testcase_01 AC 16 ms
8,292 KB
testcase_02 AC 16 ms
8,252 KB
testcase_03 AC 16 ms
8,252 KB
testcase_04 AC 16 ms
8,244 KB
testcase_05 AC 16 ms
8,224 KB
testcase_06 AC 17 ms
8,228 KB
testcase_07 AC 16 ms
7,860 KB
testcase_08 AC 15 ms
7,848 KB
testcase_09 AC 16 ms
7,808 KB
testcase_10 AC 16 ms
8,252 KB
testcase_11 WA -
testcase_12 AC 15 ms
8,224 KB
testcase_13 AC 15 ms
8,008 KB
testcase_14 WA -
testcase_15 AC 16 ms
8,292 KB
testcase_16 WA -
testcase_17 AC 17 ms
8,324 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 16 ms
8,344 KB
testcase_25 AC 16 ms
7,812 KB
testcase_26 WA -
testcase_27 AC 16 ms
7,912 KB
testcase_28 WA -
testcase_29 AC 16 ms
7,808 KB
testcase_30 WA -
testcase_31 AC 16 ms
7,924 KB
testcase_32 AC 15 ms
7,816 KB
testcase_33 WA -
testcase_34 AC 16 ms
7,776 KB
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 16 ms
7,976 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
points = list({int(x) for x in input().split()})
min_distance = -1
if len(points) < N:
    min_distance = 0
minp1 = points[0]
minp2 = points[1]
maxp = points[0]
for i in points[1:]:
    if i < minp1:
        minp2 = minp1
        minp1 = i
    maxp = max(i,maxp)
if min_distance:
    min_distance = minp2 - minp1
max_distance = maxp - minp1
print(min_distance)
print(max_distance)
0