結果

問題 No.716 距離
ユーザー MA_yo_TAMA_yo_TA
提出日時 2018-08-02 07:45:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 234 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 11,804 KB
実行使用メモリ 10,168 KB
最終ジャッジ日時 2023-10-19 20:59:22
合計ジャッジ時間 3,936 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
10,168 KB
testcase_01 AC 118 ms
10,168 KB
testcase_02 AC 115 ms
10,168 KB
testcase_03 AC 114 ms
10,168 KB
testcase_04 AC 115 ms
10,168 KB
testcase_05 AC 113 ms
10,168 KB
testcase_06 AC 113 ms
10,168 KB
testcase_07 AC 28 ms
10,048 KB
testcase_08 AC 30 ms
10,048 KB
testcase_09 AC 28 ms
10,048 KB
testcase_10 AC 86 ms
10,136 KB
testcase_11 AC 46 ms
10,084 KB
testcase_12 AC 108 ms
10,164 KB
testcase_13 AC 80 ms
10,132 KB
testcase_14 AC 29 ms
10,048 KB
testcase_15 AC 96 ms
10,156 KB
testcase_16 AC 57 ms
10,100 KB
testcase_17 AC 104 ms
10,160 KB
testcase_18 AC 30 ms
10,052 KB
testcase_19 AC 48 ms
10,092 KB
testcase_20 AC 29 ms
10,048 KB
testcase_21 AC 30 ms
10,052 KB
testcase_22 AC 38 ms
10,068 KB
testcase_23 AC 31 ms
10,052 KB
testcase_24 AC 87 ms
10,136 KB
testcase_25 AC 45 ms
10,084 KB
testcase_26 AC 62 ms
10,108 KB
testcase_27 AC 71 ms
10,128 KB
testcase_28 AC 30 ms
10,052 KB
testcase_29 AC 64 ms
10,116 KB
testcase_30 AC 62 ms
10,108 KB
testcase_31 AC 86 ms
10,136 KB
testcase_32 AC 71 ms
10,128 KB
testcase_33 AC 67 ms
10,120 KB
testcase_34 AC 55 ms
10,096 KB
testcase_35 AC 28 ms
10,048 KB
testcase_36 AC 34 ms
10,060 KB
testcase_37 AC 29 ms
10,048 KB
testcase_38 AC 43 ms
10,076 KB
testcase_39 AC 65 ms
10,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
a = [int(i) for i in input().split()]
max = a[len(a) - 1] - a[0]
min = a[1] - a[0]
for i in range(1, len(a)):
    for j in range(i):
        if min > (a[i] - a[j]):
            min = a[i] - a[j]
print(min)
print(max)
0