mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-13 11:21:42 +08:00
add leetcode problem-cn part2
This commit is contained in:
36
算法题(国内版)/problem (Chinese)/每日温度 [iIQa4I].html
Normal file
36
算法题(国内版)/problem (Chinese)/每日温度 [iIQa4I].html
Normal file
@@ -0,0 +1,36 @@
|
||||
<p>请根据每日 <code>气温</code> 列表 <code>temperatures</code> ,重新生成一个列表,要求其对应位置的输出为:要想观测到更高的气温,至少需要等待的天数。如果气温在这之后都不会升高,请在该位置用 <code>0</code> 来代替。</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>示例 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong> <code>temperatures</code> = [73,74,75,71,69,72,76,73]
|
||||
<strong>输出:</strong> [1,1,4,2,1,1,0,0]
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong> temperatures = [30,40,50,60]
|
||||
<strong>输出:</strong> [1,1,1,0]
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 3:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong> temperatures = [30,60,90]
|
||||
<strong>输出: </strong>[1,1,0]</pre>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>提示:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>1 <= temperatures.length <= 10<sup>5</sup></code></li>
|
||||
<li><code>30 <= temperatures[i] <= 100</code></li>
|
||||
</ul>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><meta charset="UTF-8" />注意:本题与主站 739 题相同: <a href="https://leetcode-cn.com/problems/daily-temperatures/">https://leetcode-cn.com/problems/daily-temperatures/</a></p>
|
Reference in New Issue
Block a user