結果
| 問題 | No.135 とりあえず1次元の問題 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-03-31 01:22:56 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 165 ms / 5,000 ms |
| コード長 | 262 bytes |
| 記録 | |
| コンパイル時間 | 524 ms |
| コンパイル使用メモリ | 20,604 KB |
| 実行使用メモリ | 23,792 KB |
| 最終ジャッジ日時 | 2026-03-28 17:32:06 |
| 合計ジャッジ時間 | 3,904 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 22 |
ソースコード
n=int(input())
ls=list(map(int,input().split()))
ls.sort()
lsdis=[]
for i in range(n-1):
lsdis.append(ls[i+1]-ls[i])
lsnew=[]
for i in range(len(lsdis)):
if lsdis[i]!=0:
lsnew.append(lsdis[i])
if len(lsnew)==0:
print(0)
else:
print(min(lsnew))