結果
問題 | No.135 とりあえず1次元の問題 |
ユーザー |
![]() |
提出日時 | 2018-03-09 14:20:28 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 348 bytes |
コンパイル時間 | 159 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 25,848 KB |
最終ジャッジ日時 | 2024-10-08 10:18:09 |
合計ジャッジ時間 | 8,927 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 TLE * 1 -- * 1 |
ソースコード
import sys N = int(input()) if N == 1: print(0) sys.exit() l = sorted([int(i) for i in input().split()], reverse=True) diff_close_l = [] for i in range(N-1): diff_close_l.append(l[i] - l[i+1]) while 0 in diff_close_l: diff_close_l.remove(0) if len(diff_close_l) == 0: print(0) sys.exit() print(min(diff_close_l))