結果

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

ソースコード

diff #

def main():
    input()  # N
    A = sorted(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