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 10N. 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)为小于10N的支配数的数目。例如,D(4)=603D(10)=21893256

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


Gitalking ...