2023-12-09 18:42:21 +08:00
|
|
|
|
<p>给你一个整数 <code>n</code> ,请你找出并返回第 <code>n</code> 个 丑数 。</p>
|
|
|
|
|
|
|
|
|
|
<p><strong>说明:</strong>丑数是只包含质因数 2、3 和/或 5 的正整数;1 是丑数。</p>
|
2022-03-27 20:38:29 +08:00
|
|
|
|
|
|
|
|
|
<p> </p>
|
|
|
|
|
|
2023-12-09 18:42:21 +08:00
|
|
|
|
<p><strong>示例 1:</strong></p>
|
2022-03-27 20:38:29 +08:00
|
|
|
|
|
2023-12-09 18:42:21 +08:00
|
|
|
|
<pre>
|
|
|
|
|
<strong>输入:</strong> n = 10
|
2022-03-27 20:38:29 +08:00
|
|
|
|
<strong>输出:</strong> 12
|
|
|
|
|
<strong>解释: </strong><code>1, 2, 3, 4, 5, 6, 8, 9, 10, 12</code> 是前 10 个丑数。</pre>
|
|
|
|
|
|
2023-12-09 18:42:21 +08:00
|
|
|
|
<p><b>提示:</b> </p>
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
<li><code>1 <= n <=<b> </b>1690</code></li>
|
|
|
|
|
</ul>
|
2022-03-27 20:38:29 +08:00
|
|
|
|
|
2023-12-09 18:42:21 +08:00
|
|
|
|
<p> </p>
|
2022-03-27 20:38:29 +08:00
|
|
|
|
|
|
|
|
|
<p>注意:本题与主站 264 题相同:<a href="https://leetcode-cn.com/problems/ugly-number-ii/">https://leetcode-cn.com/problems/ugly-number-ii/</a></p>
|
2023-12-09 18:42:21 +08:00
|
|
|
|
|
|
|
|
|
<p> </p>
|