1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 15:31:43 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
Files
leetcode-problemset/leetcode-cn/problem (Chinese)/每日温度 [iIQa4I].html
2025-01-09 20:29:41 +08:00

37 lines
1.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>请根据每日 <code>气温</code> 列表 <code>temperatures</code>&nbsp;,重新生成一个列表,要求其对应位置的输出为:要想观测到更高的气温,至少需要等待的天数。如果气温在这之后都不会升高,请在该位置用&nbsp;<code>0</code> 来代替。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>temperatures = [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>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 &lt;=&nbsp;temperatures.length &lt;= 10<sup>5</sup></code></li>
<li><code>30 &lt;=&nbsp;temperatures[i]&nbsp;&lt;= 100</code></li>
</ul>
<p>&nbsp;</p>
<p><meta charset="UTF-8" />注意:本题与主站 739&nbsp;题相同:&nbsp;<a href="https://leetcode-cn.com/problems/daily-temperatures/">https://leetcode-cn.com/problems/daily-temperatures/</a></p>