結果

問題 No.716 距離
ユーザー fV9TwBhUoa9S3eVfV9TwBhUoa9S3eV
提出日時 2019-09-25 15:03:33
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 334 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 15,232 KB
最終ジャッジ日時 2024-09-22 06:31:00
合計ジャッジ時間 5,288 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33 RE * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

# No.716 距離
def select_distance_min(n, a):
    if len(a) == 1:
        return n
    
    for i in a[1:]:
        n = min(i - a[0], n)
    return select_distance_min(n, a[1:])

n = int(input())
a = [int(i) for i in input().split()]

distance_max = a[n - 1] - a[0]

print(select_distance_min(distance_max, a))
print(distance_max)


0