CF908G.New Year and Original Order
省选/NOI-
通过率:0%
时间限制:2.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
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
modulo 109 + 7.
令 S(n) 表示将 n 的各位数字按升序排列后所构成的数。例如,S(1)=1,S(5)=5,S(50394)=3459,S(353535)=333555。
给定一个数 X,计算
对 109+7 取模的结果。
输入格式
The first line of input will contain the integer X (1 ≤ X ≤ 10700).
输入的第一行包含整数 X(1 ≤ X ≤ 10700)。
输出格式
Print a single integer, the answer to the question.
输出一个整数,即该问题的答案。
输入输出样例
输入#1
21
输出#1
195
输入#2
345342
输出#2
390548434
说明/提示
The first few values of S are 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 12. The sum of these values is 195.
前几个 S 的值为 1,2,3,4,5,6,7,8,9,1,11,12,13,14,15,16,17,18,19,2,12。这些值的和为 195。
输入解题思路,AI测评打分。不知道怎么写?