Yukikaze is learning stringology. She found a series of interesting problems at the end of her textbook as follows.
We consider a string to be good if it satisfies the following conditions:
-
It consists of decimal digits less than www.
-
Digit iii appears at least cic_ici times.
We consider two strings to be different if they are different in length or there exists an integer
iii such that the letters in their
iii-th position are different.
The problem in the textbook asks for the number of different good strings of length
nnn.