0%

Problem 788


Problem 788


Dominating Numbers

A dominating number is a positive integer that has more than half of its digits equal.

For example, $2022$ is a dominating number because three of its four digits are equal to $2$. But $2021$ is not a dominating number.

Let $D(N)$ be how many dominating numbers are less than $10^N$. For example, $D(4) = 603$ and $D(10) = 21893256$.

Find $D(2022)$. Give your answer modulo $1\ 000\ 000\ 007$.


支配数

支配数是指有一半以上数字相同的正整数。

例如,$2022$是支配数,因为其四个数字中有三个是$2$。反之,$2021$不是一个支配数。

记$D(N)$为小于$10^N$的支配数的数目。例如,$D(4) = 603$,$D(10) = 21893256$。

求$D(2022)$,并将你的答案对$1\ 000\ 000\ 007$取余。