Score : 500 points
Find the number of integers between 1 and N (inclusive) that contains exactly K non-zero digits when written in base ten.
Input is given from Standard Input in the following format:
N K
Print the count.
100 1
19
The following 19 integers satisfy the condition:
25 2
14
The following 14 integers satisfy the condition:
314159 2
937
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 3
117879300