結果

問題 No.716 距離
ユーザー machoniumpmachoniump
提出日時 2024-02-24 17:16:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,072 ms / 2,000 ms
コード長 233 bytes
コンパイル時間 316 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 10,112 KB
最終ジャッジ日時 2024-02-24 17:17:05
合計ジャッジ時間 20,518 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,004 ms
10,112 KB
testcase_01 AC 1,039 ms
10,112 KB
testcase_02 AC 974 ms
10,112 KB
testcase_03 AC 996 ms
10,112 KB
testcase_04 AC 1,072 ms
10,112 KB
testcase_05 AC 995 ms
10,112 KB
testcase_06 AC 1,015 ms
10,112 KB
testcase_07 AC 25 ms
9,984 KB
testcase_08 AC 24 ms
9,984 KB
testcase_09 AC 24 ms
9,984 KB
testcase_10 AC 651 ms
10,112 KB
testcase_11 AC 214 ms
10,112 KB
testcase_12 AC 888 ms
10,112 KB
testcase_13 AC 597 ms
10,112 KB
testcase_14 AC 24 ms
9,984 KB
testcase_15 AC 816 ms
10,112 KB
testcase_16 AC 361 ms
10,112 KB
testcase_17 AC 839 ms
10,112 KB
testcase_18 AC 37 ms
9,984 KB
testcase_19 AC 269 ms
10,112 KB
testcase_20 AC 26 ms
9,984 KB
testcase_21 AC 40 ms
9,984 KB
testcase_22 AC 117 ms
9,984 KB
testcase_23 AC 39 ms
9,984 KB
testcase_24 AC 673 ms
10,112 KB
testcase_25 AC 237 ms
10,112 KB
testcase_26 AC 430 ms
10,112 KB
testcase_27 AC 501 ms
10,112 KB
testcase_28 AC 36 ms
9,984 KB
testcase_29 AC 457 ms
10,112 KB
testcase_30 AC 396 ms
10,112 KB
testcase_31 AC 600 ms
10,112 KB
testcase_32 AC 489 ms
10,112 KB
testcase_33 AC 454 ms
10,112 KB
testcase_34 AC 334 ms
10,112 KB
testcase_35 AC 30 ms
9,984 KB
testcase_36 AC 78 ms
9,984 KB
testcase_37 AC 28 ms
9,984 KB
testcase_38 AC 171 ms
9,984 KB
testcase_39 AC 442 ms
10,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int,input().split()))
mini=10**18
maxi=0
for i in range(n):
    for j in range(n):
        if i==j:continue
        mini=min(mini,abs(a[i]-a[j]))
        maxi=max(maxi,abs(a[i]-a[j]))
print(mini)
print(maxi)
0