結果
| 問題 |
No.135 とりあえず1次元の問題
|
| コンテスト | |
| ユーザー |
あかりき
|
| 提出日時 | 2021-02-09 21:47:09 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 76 ms / 5,000 ms |
| コード長 | 184 bytes |
| コンパイル時間 | 215 ms |
| コンパイル使用メモリ | 82,296 KB |
| 実行使用メモリ | 90,284 KB |
| 最終ジャッジ日時 | 2024-07-07 03:43:53 |
| 合計ジャッジ時間 | 2,042 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 22 |
ソースコード
n=int(input())
x=list(map(int,input().split()))
x.sort()
ans=[]
for i in range(n-1):
if x[i+1]-x[i]!=0:
ans.append(x[i+1]-x[i])
if len(ans)==0:
print(0)
else:
print(min(ans))
あかりき