mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-10 18:48:13 +08:00
28 lines
657 B
HTML
28 lines
657 B
HTML
<p>输入一个正整数 <code>target</code> ,输出所有和为 <code>target</code> 的连续正整数序列(至少含有两个数)。</p>
|
||
|
||
<p>序列内的数字由小到大排列,不同序列按照首个数字从小到大排列。</p>
|
||
|
||
<p> </p>
|
||
|
||
<p><strong>示例 1:</strong></p>
|
||
|
||
<pre><strong>输入:</strong>target = 9
|
||
<strong>输出:</strong>[[2,3,4],[4,5]]
|
||
</pre>
|
||
|
||
<p><strong>示例 2:</strong></p>
|
||
|
||
<pre><strong>输入:</strong>target = 15
|
||
<strong>输出:</strong>[[1,2,3,4,5],[4,5,6],[7,8]]
|
||
</pre>
|
||
|
||
<p> </p>
|
||
|
||
<p><strong>限制:</strong></p>
|
||
|
||
<ul>
|
||
<li><code>1 <= target <= 10^5</code></li>
|
||
</ul>
|
||
|
||
<p> </p>
|