The same idea, but using math to get the digit. Somehow, it runs faster.

public int findNthDigit2(int n) { int len = 1; long count = 9; int start = 1; while (n > len * count) { n -= len * count; len++; count *= 10; start *= 10; } start += (n - 1) / len; int offset = n % len; offset = offset > 0 ? (len - offset) : offset; while (offset-- > 0) { start /= 10; } return start % 10; }Nth Digit