結果
問題 |
No.135 とりあえず1次元の問題
|
ユーザー |
![]() |
提出日時 | 2018-03-10 18:35:00 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 401 bytes |
コンパイル時間 | 80 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 50,076 KB |
最終ジャッジ日時 | 2024-10-14 17:33:17 |
合計ジャッジ時間 | 15,058 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 RE * 1 |
other | WA * 10 RE * 12 |
ソースコード
import sys import numpy as np N = int(input()) if N == 1: print(0) sys.exit() l = sorted([int(i) for i in input().split()], reverse=True) diff_close_l = [] diff_close_l = np.diff(l,n=1) #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))