此题与jz044.数字序列中某一位的数字相似。
class Solution:
def findNthDigit1(self, n: int) -> int:
digit, start, count = 1, 1, 9
while n > count:
n -= count
start *= 10
digit += 1
count = 9 * start * digit
num = start + (n - 1) // digit
return int(str(num)[(n - 1) % digit])
PREVIOUSjz044.数字序列中某一位的数字
NEXTjz045.把数组排成最小的数