結果

問題 No.135 とりあえず1次元の問題
ユーザー Co-3
提出日時 2020-08-22 18:37:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 236 bytes
コンパイル時間 156 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 81,408 KB
最終ジャッジ日時 2024-10-15 12:07:38
合計ジャッジ時間 2,090 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 21 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
x = list(map(int,input().split()))
x.sort()
ans = 1000000
for i in range(n-1):
    y = (x[i+1])-(x[i])
    if y == 0:
        continue
    elif y<ans:
        ans = y
if ans == 1000000:
    print(0)
else:
    print(ans)
0