题库练习 New Year and Original Order
← 上一题 下一题 →

A11545 | New Year and Original Order

时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

Let $S(n)$ denote the number that represents the digits of $n$ in sorted order. For example, $S(1)=1,S(5)=5,S(50394)=3459,S(353535)=333555$ .

Given a number $X$ , compute ![](/uploads/acgo/image/fb16f2e02a49e795_09c5ee0d2ed2.jpeg) modulo $10^{9}+7$ .

输入格式

The first line of input will contain the integer $X$ ( $1<=X<=10^{700}$ ).

输出格式

Print a single integer, the answer to the question.

输入输出样例

输入 #1
21
输出 #1
195
输入 #2
345342
输出 #2
390548434
C++ 编辑器
输入
输出