P9640 [SNCPC2019] Digit Mode

题目描述

Let $m(x)$ be the $\textit{mode}$ of the digits in decimal representation of positive integer $x$. The mode is the largest value that occurs most frequently in the sequence. For example, $m(15532)=5$, $m(25252)=2$, $m(103000)=0$, $m(364364)=6$, $m(114514)=1$, $m(889464)=8$. Given a positive integer $n$, DreamGrid would like to know the value of $(\sum\limits_{x=1}^{n} m(x)) \bmod (10^9+7)$.

输入格式

输出格式