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,36 @@
<p>给定正整数 <code>k</code>&nbsp;,你需要找出可以被 <code>k</code>&nbsp;整除的、仅包含数字 <code><strong>1</strong></code> 的最 <strong></strong> 正整数 <code>n</code>&nbsp;的长度。</p>
<p>返回 <code>n</code>&nbsp;的长度。如果不存在这样的 <code>n</code>&nbsp;,就返回-1。</p>
<p><strong>注意:</strong> <code>n</code>&nbsp;不符合 64 位带符号整数。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>k = 1
<strong>输出:</strong>1
<strong>解释:</strong>最小的答案是 n = 1其长度为 1。</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong>k = 2
<strong>输出:</strong>-1
<strong>解释:</strong>不存在可被 2 整除的正整数 n 。</pre>
<p><strong>示例 3</strong></p>
<pre>
<strong>输入:</strong>k = 3
<strong>输出:</strong>3
<strong>解释:</strong>最小的答案是 n = 111其长度为 3。</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 &lt;= k &lt;= 10<sup>5</sup></code></li>
</ul>