結果
問題 |
No.135 とりあえず1次元の問題
|
ユーザー |
![]() |
提出日時 | 2018-03-09 14:16:28 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 297 bytes |
コンパイル時間 | 316 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 41,720 KB |
最終ジャッジ日時 | 2024-10-08 10:02:21 |
合計ジャッジ時間 | 9,405 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 19 RE * 1 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) print(l) 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) print(min(diff_close_l))