結果

問題 No.716 距離
ユーザー oz4point5oz4point5
提出日時 2019-03-30 03:18:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 541 ms / 2,000 ms
コード長 284 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-24 21:37:52
合計ジャッジ時間 11,541 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 541 ms
10,752 KB
testcase_01 AC 528 ms
10,752 KB
testcase_02 AC 510 ms
10,624 KB
testcase_03 AC 513 ms
10,880 KB
testcase_04 AC 505 ms
10,752 KB
testcase_05 AC 523 ms
10,880 KB
testcase_06 AC 510 ms
10,752 KB
testcase_07 AC 29 ms
10,624 KB
testcase_08 AC 29 ms
10,624 KB
testcase_09 AC 29 ms
10,624 KB
testcase_10 AC 357 ms
10,624 KB
testcase_11 AC 122 ms
10,752 KB
testcase_12 AC 467 ms
10,752 KB
testcase_13 AC 318 ms
10,752 KB
testcase_14 AC 30 ms
10,624 KB
testcase_15 AC 439 ms
10,752 KB
testcase_16 AC 183 ms
10,624 KB
testcase_17 AC 455 ms
10,752 KB
testcase_18 AC 36 ms
10,752 KB
testcase_19 AC 139 ms
10,752 KB
testcase_20 AC 29 ms
10,624 KB
testcase_21 AC 38 ms
10,624 KB
testcase_22 AC 75 ms
10,752 KB
testcase_23 AC 34 ms
10,624 KB
testcase_24 AC 363 ms
10,880 KB
testcase_25 AC 127 ms
10,752 KB
testcase_26 AC 216 ms
10,752 KB
testcase_27 AC 271 ms
10,752 KB
testcase_28 AC 35 ms
10,752 KB
testcase_29 AC 236 ms
10,624 KB
testcase_30 AC 222 ms
10,752 KB
testcase_31 AC 325 ms
10,752 KB
testcase_32 AC 269 ms
10,752 KB
testcase_33 AC 248 ms
10,752 KB
testcase_34 AC 183 ms
10,752 KB
testcase_35 AC 29 ms
10,624 KB
testcase_36 AC 58 ms
10,880 KB
testcase_37 AC 31 ms
10,624 KB
testcase_38 AC 100 ms
10,752 KB
testcase_39 AC 238 ms
10,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-

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

maxlen = 0
minlen = 1000000

for i in range(n):
    for j in range(i+1,n):
        temp = abs(a[i] - a[j])
        maxlen = max(temp, maxlen)
        minlen = min(temp, minlen)

print(minlen)
print(maxlen)
0