1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-12 10:51:42 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

存量题库数据更新

This commit is contained in:
2023-12-09 18:42:21 +08:00
parent a788808cd7
commit c198538f10
10843 changed files with 288489 additions and 248355 deletions

View File

@@ -1,37 +1,36 @@
<p>几乎每一个人都用&nbsp;<a href="https://baike.baidu.com/item/%E4%B9%98%E6%B3%95%E8%A1%A8">乘法表</a>。但是你能在乘法表中快速找到第<code>k</code>小的数字吗?</p>
<p>几乎每一个人都用&nbsp;<a href="https://baike.baidu.com/item/%E4%B9%98%E6%B3%95%E8%A1%A8">乘法表</a>。但是你能在乘法表中快速找到第 <code>k</code> 小的数字吗?</p>
<p>给定高度<code>m</code>&nbsp;、宽度<code>n</code> 的一&nbsp;<code>m * n</code>的乘法表,以及正整数<code>k</code>,你需要返回表中第<code>k</code>&nbsp;小的数字</p>
<p>乘法表是大小为 <code>m x n</code> 的一个整数矩阵,其中&nbsp;<code>mat[i][j] == i * j</code>(下标从 <strong>1</strong> 开始)</p>
<p><strong>&nbsp;1</strong></p>
<p>给你三个整数 <code>m</code><code>n</code><code>k</code>,请你在大小为&nbsp;<code>m x n</code> 的乘法表中,找出并返回第 <code>k</code>&nbsp;小的数字。</p>
<div class="original__bRMd">
<div>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2021/05/02/multtable1-grid.jpg" style="width: 500px; height: 254px;" />
<pre>
<strong>输入:</strong> m = 3, n = 3, k = 5
<strong>输出:</strong> 3
<strong>解释:</strong>
乘法表:
1 2 3
2 4 6
3 6 9
第5小的数字是 3 (1, 2, 2, 3, 3).
<strong>输入</strong>m = 3, n = 3, k = 5
<strong>输出</strong>3
<strong>解释</strong>第 5 小的数字是 3 。
</pre>
<p><strong>例 2</strong></p>
<p><strong>例 2</strong></p>
<img alt="" src="https://assets.leetcode.com/uploads/2021/05/02/multtable2-grid.jpg" style="width: 493px; height: 293px;" />
<pre>
<strong>输入:</strong> m = 2, n = 3, k = 6
<strong>输出:</strong> 6
<strong>解释:</strong>
乘法表:
1 2 3
2 4 6
第6小的数字是 6 (1, 2, 2, 3, 4, 6).
<strong>输入</strong>m = 2, n = 3, k = 6
<strong>输出</strong>6
<strong>解释</strong>第 6 小的数字是 6 。
</pre>
<p><strong>注意:</strong></p>
<p>&nbsp;</p>
<ol>
<li><code>m</code>&nbsp;<code>n</code>&nbsp;的范围在 [1, 30000] 之间。</li>
<li><code>k</code> 的范围在 [1, m * n] 之间。</li>
</ol>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 &lt;= m, n &lt;= 3 * 10<sup>4</sup></code></li>
<li><code>1 &lt;= k &lt;= m * n</code></li>
</ul>
</div>
</div>