結果

問題 No.135 とりあえず1次元の問題
ユーザー cologne
提出日時 2022-08-29 18:26:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 90 ms / 5,000 ms
コード長 234 bytes
コンパイル時間 346 ms
コンパイル使用メモリ 82,192 KB
実行使用メモリ 90,752 KB
最終ジャッジ日時 2024-11-06 15:39:42
合計ジャッジ時間 2,274 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    input()  # N
    A = sorted(set(map(int, input().split())))
    x = float('inf') if len(A) != 1 else 0
    for i in range(len(A)-1):
        x = min(x, A[i+1]-A[i])
    print(x)


if __name__ == '__main__':
    main()
0