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

add leetcode problem-cn part3

This commit is contained in:
2022-03-27 20:46:41 +08:00
parent 6dafca13c5
commit dfacb20d31
1385 changed files with 115239 additions and 3 deletions

View File

@@ -0,0 +1,39 @@
<p>&nbsp;<code>f(x)</code>&nbsp;&nbsp;<code>x!</code>&nbsp;末尾是 0 的数量。回想一下&nbsp;<code>x! = 1 * 2 * 3 * ... * x</code>,且 <code>0! = 1</code>&nbsp;</p>
<ul>
<li>例如,&nbsp;<code>f(3) = 0</code>&nbsp;,因为 <code>3! = 6</code> 的末尾没有 0 ;而 <code>f(11) = 2</code>&nbsp;,因为 <code>11!= 39916800</code> 末端有 2 个 0 。</li>
</ul>
<p>给定&nbsp;<code>k</code>,找出返回能满足 <code>f(x) = k</code>&nbsp;的非负整数 <code>x</code>&nbsp;的数量。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong><strong> </strong></p>
<pre>
<strong>输入:</strong>k = 0<strong>
输出:</strong>5<strong>
解释:</strong>0!, 1!, 2!, 3!, 和 4!&nbsp;均符合 k = 0 的条件。
</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong>k = 5
<strong>输出:</strong>0
<strong>解释:</strong>没有匹配到这样的 x!,符合 k = 5 的条件。</pre>
<p><strong>示例 3:</strong></p>
<pre>
<strong>输入:</strong> k = 3
<strong>输出:</strong> 5
</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>0 &lt;= k &lt;= 10<sup>9</sup></code></li>
</ul>