結果

問題 No.135 とりあえず1次元の問題
ユーザー yuki2006yuki2006
提出日時 2015-01-19 20:21:51
言語 PyPy2
(7.3.13)
結果
AC  
実行時間 110 ms / 5,000 ms
コード長 184 bytes
コンパイル時間 1,843 ms
コンパイル使用メモリ 77,352 KB
実行使用メモリ 87,180 KB
最終ジャッジ日時 2023-08-31 01:20:04
合計ジャッジ時間 4,615 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
87,028 KB
testcase_01 AC 72 ms
76,528 KB
testcase_02 AC 72 ms
76,528 KB
testcase_03 AC 72 ms
76,460 KB
testcase_04 AC 72 ms
76,512 KB
testcase_05 AC 73 ms
76,416 KB
testcase_06 AC 73 ms
76,504 KB
testcase_07 AC 73 ms
76,168 KB
testcase_08 AC 74 ms
76,168 KB
testcase_09 AC 74 ms
76,292 KB
testcase_10 AC 75 ms
76,576 KB
testcase_11 AC 73 ms
76,284 KB
testcase_12 AC 73 ms
76,280 KB
testcase_13 AC 73 ms
76,440 KB
testcase_14 AC 75 ms
77,520 KB
testcase_15 AC 75 ms
76,276 KB
testcase_16 AC 74 ms
77,340 KB
testcase_17 AC 75 ms
77,472 KB
testcase_18 AC 73 ms
76,664 KB
testcase_19 AC 76 ms
77,476 KB
testcase_20 AC 75 ms
76,296 KB
testcase_21 AC 92 ms
86,252 KB
testcase_22 AC 110 ms
87,180 KB
evil01.txt AC 99 ms
87,044 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(raw_input())
A = map(int, raw_input().split())

A.sort()

mn = A[-1] - A[0]
for i in xrange(len(A) - 1):
    v = A[i + 1] - A[i]
    if v > 0:
        mn = min(mn, v)

print mn
0