結果

問題 No.716 距離
ユーザー NoviNovi
提出日時 2020-04-07 23:38:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 257 ms / 2,000 ms
コード長 219 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 27,912 KB
最終ジャッジ日時 2023-09-22 17:58:48
合計ジャッジ時間 6,272 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 244 ms
27,888 KB
testcase_01 AC 257 ms
27,876 KB
testcase_02 AC 247 ms
27,844 KB
testcase_03 AC 243 ms
27,912 KB
testcase_04 AC 245 ms
27,848 KB
testcase_05 AC 251 ms
27,884 KB
testcase_06 AC 247 ms
27,848 KB
testcase_07 AC 16 ms
8,156 KB
testcase_08 AC 15 ms
8,152 KB
testcase_09 AC 15 ms
8,132 KB
testcase_10 AC 172 ms
21,596 KB
testcase_11 AC 59 ms
11,984 KB
testcase_12 AC 223 ms
26,104 KB
testcase_13 AC 151 ms
19,936 KB
testcase_14 AC 15 ms
8,132 KB
testcase_15 AC 199 ms
24,088 KB
testcase_16 AC 90 ms
14,600 KB
testcase_17 AC 217 ms
25,412 KB
testcase_18 AC 20 ms
8,348 KB
testcase_19 AC 68 ms
12,780 KB
testcase_20 AC 16 ms
8,184 KB
testcase_21 AC 19 ms
8,464 KB
testcase_22 AC 37 ms
9,980 KB
testcase_23 AC 19 ms
8,356 KB
testcase_24 AC 175 ms
21,428 KB
testcase_25 AC 60 ms
11,972 KB
testcase_26 AC 107 ms
16,012 KB
testcase_27 AC 139 ms
18,296 KB
testcase_28 AC 18 ms
8,456 KB
testcase_29 AC 112 ms
16,388 KB
testcase_30 AC 104 ms
15,964 KB
testcase_31 AC 153 ms
20,244 KB
testcase_32 AC 129 ms
17,848 KB
testcase_33 AC 119 ms
16,912 KB
testcase_34 AC 87 ms
14,316 KB
testcase_35 AC 16 ms
8,284 KB
testcase_36 AC 28 ms
9,388 KB
testcase_37 AC 16 ms
8,276 KB
testcase_38 AC 48 ms
11,088 KB
testcase_39 AC 111 ms
16,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import  itertools
n=int(input())
a=list(map(int,input().split()))

tmp=[]

for dist in itertools.combinations(a,2):
    dis=list(dist)
    distance=dis[1]-dis[0]
    tmp.append(distance)

print(min(tmp))
print(max(tmp))
0