```
public int findNthDigit(int n) {
int k = 1;
long num = 9;
int start = 1;
while (n > k * num) {
n -= k++ * num;
num *= 10;
start *= 10;
}
start += --n / k;
return Integer.toString(start).charAt(n % k) - '0';
}
```

Because k*num may cause overflow, so use **long** for num.