結果
問題 | No.135 とりあえず1次元の問題 |
ユーザー |
|
提出日時 | 2015-12-08 01:32:53 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 479 bytes |
コンパイル時間 | 250 ms |
コンパイル使用メモリ | 12,032 KB |
実行使用メモリ | 20,832 KB |
最終ジャッジ日時 | 2025-01-03 10:34:50 |
合計ジャッジ時間 | 2,634 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 2 |
other | RE * 22 |
ソースコード
n = int(input())numList = list(map(int, input().split()))numList = sorted(numList)ret = nullfor i in range(n):if (i == n - 1):breakelif (numList[i] - numList[i + 1]):continueval = abs(numList[i] - numList[i + 1])print("min =")print(ret)if i == 0:# 初回の場合 無条件で最小値を代入ret = valcontinue;elif ret > abs(val):ret = valif ret == null:ret = 0print(ret)