結果
問題 | No.135 とりあえず1次元の問題 |
ユーザー |
|
提出日時 | 2016-08-25 21:48:19 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 134 ms / 5,000 ms |
コード長 | 225 bytes |
コンパイル時間 | 85 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 20,836 KB |
最終ジャッジ日時 | 2024-06-11 06:55:18 |
合計ジャッジ時間 | 1,891 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
#!/usr/bin/env python3 n = int(input()) x = sorted(map(int,input().split())) ans = float('inf') for i in range(n-1): if x[i] != x[i+1]: ans = min(ans, x[i+1] - x[i]) if ans == float('inf'): ans = 0 print(ans)