思路:https://blog.youkuaiyun.com/yi_afly/article/details/52012593
static int getNum4k(int n, int k) {
if (n<k)
return 0;
int count = 0;
int round = n;
int base = 1;
while (round > 0) {
int w = round%10;
round/=10;
count = round*base;
if (w==k) {
count += (n%base) +1;
}else if (w>k){
count += base;
}
base*=10;
}
return count;
}