結果
問題 |
No.135 とりあえず1次元の問題
|
ユーザー |
|
提出日時 | 2020-06-04 20:49:08 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 227 bytes |
コンパイル時間 | 83 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 24,028 KB |
最終ジャッジ日時 | 2024-11-30 04:23:17 |
合計ジャッジ時間 | 2,282 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 16 WA * 6 |
ソースコード
n = int(input()) x = list(map(int, input().split())) x = list(set(sorted(x))) ans = float("inf") for i in range(len(x)-1): if abs(x[i]-x[i+1]) <= ans and abs(x[i]-x[i+1]) != 0: ans = abs(x[i]-x[i+1]) print(ans)