1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-19 20:16:48 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-03-29 12:43:11 +08:00
parent 58bbdfd57c
commit 2b0511d272
10721 changed files with 8123 additions and 8119 deletions

View File

@@ -0,0 +1,26 @@
<p>给你一个整数 <code>n</code> ,返回 <em>和为 <code>n</code> 的完全平方数的最少数量</em></p>
<p><strong>完全平方数</strong> 是一个整数,其值等于另一个整数的平方;换句话说,其值等于一个整数自乘的积。例如,<code>1</code><code>4</code><code>9</code><code>16</code> 都是完全平方数,而 <code>3</code><code>11</code> 不是。</p>
<p>&nbsp;</p>
<p><strong>示例&nbsp;1</strong></p>
<pre>
<strong>输入:</strong>n = <code>12</code>
<strong>输出:</strong>3
<strong>解释:</strong><code>12 = 4 + 4 + 4</code></pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong>n = <code>13</code>
<strong>输出:</strong>2
<strong>解释:</strong><code>13 = 4 + 9</code></pre>
&nbsp;
<p><strong>提示:</strong></p>
<ul>
<li><code>1 &lt;= n &lt;= 10<sup>4</sup></code></li>
</ul>