結果

問題 No.135 とりあえず1次元の問題
コンテスト
ユーザー akihito0000
提出日時 2016-09-12 18:47:11
言語 PyPy2
(7.3.20)
コンパイル:
pypy2 -m py_compile _filename_
実行:
/usr/bin/pypy2 Main.pyc
結果
AC  
実行時間 94 ms / 5,000 ms
+ 853µs
コード長 241 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 69 ms
コンパイル使用メモリ 80,896 KB
実行使用メモリ 113,664 KB
最終ジャッジ日時 2026-07-18 08:16:33
合計ジャッジ時間 3,342 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#!/usr/bin/python
# -*- coding: utf-8 -*-

N = int(raw_input())
arr = sorted(set((map(int, raw_input().split()))))

if len(arr) < 2:
	print "0"
	exit()

ans = []
for i in xrange(0,len(arr) - 1):
	ans.append(arr[i+1] - arr[i])

print min(ans)
0