1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-10 18:48:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/数字序列中某一位的数字 [shu-zi-xu-lie-zhong-mou-yi-wei-de-shu-zi-lcof].html
2022-03-29 12:43:11 +08:00

27 lines
754 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>数字以0123456789101112131415&hellip;的格式序列化到一个字符序列中。在这个序列中第5位从下标0开始计数是5第13位是1第19位是4等等。</p>
<p>请写一个函数求任意第n位对应的数字。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre><strong>输入:</strong>n = 3
<strong>输出:</strong>3
</pre>
<p><strong>示例 2</strong></p>
<pre><strong>输入:</strong>n = 11
<strong>输出:</strong>0</pre>
<p>&nbsp;</p>
<p><strong>限制:</strong></p>
<ul>
<li><code>0 &lt;= n &lt;&nbsp;2^31</code></li>
</ul>
<p>注意:本题与主站 400 题相同:<a href="https://leetcode-cn.com/problems/nth-digit/">https://leetcode-cn.com/problems/nth-digit/</a></p>