mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-18 03:26:45 +08:00
更新国内版新增题目
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
给你一个整数 <code>n</code> ,统计并返回各位数字都不同的数字 <code>x</code> 的个数,其中 <code>0 <= x < 10<sup>n</sup></code><sup> </sup>。
|
||||
<div class="original__bRMd">
|
||||
<div>
|
||||
<p> </p>
|
||||
|
||||
<p><strong>示例 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong>n = 2
|
||||
<strong>输出:</strong>91
|
||||
<strong>解释:</strong>答案应为除去 <code>11、22、33、44、55、66、77、88、99 </code>外,在 0 ≤ x < 100 范围内的所有数字。
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong>n = 0
|
||||
<strong>输出:</strong>1
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>提示:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>0 <= n <= 8</code></li>
|
||||
</ul>
|
Reference in New Issue
Block a user