結果
問題 | No.135 とりあえず1次元の問題 |
ユーザー | yohei-ku |
提出日時 | 2018-03-26 22:49:07 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 121 ms / 5,000 ms |
コード長 | 213 bytes |
コンパイル時間 | 313 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 16,532 KB |
最終ジャッジ日時 | 2024-06-25 12:13:26 |
合計ジャッジ時間 | 1,757 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
N = input() x = map(int,raw_input().split()) D = list(set(x)) D.sort(reverse=True) A=[] if len(D) == 1: print abs(D[0]) else: for i in range(0,len(D)-1): A.append(abs(D[i]-D[i+1])) print min(A)