結果
問題 | No.135 とりあえず1次元の問題 |
ユーザー |
|
提出日時 | 2016-09-12 18:47:11 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 104 ms / 5,000 ms |
コード長 | 241 bytes |
コンパイル時間 | 88 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 16,292 KB |
最終ジャッジ日時 | 2024-06-11 06:56:28 |
合計ジャッジ時間 | 1,413 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
#!/usr/bin/python # -*- coding: utf-8 -*- N = int(raw_input()) arr = sorted(set((map(int, raw_input().split())))) if len(arr) < 2: print "0" exit() ans = [] for i in xrange(0,len(arr) - 1): ans.append(arr[i+1] - arr[i]) print min(ans)