问题 H: hard math
内存限制:256 MB
时间限制:1 S
标准输入输出
题目类型:传统
评测方式:Special Judge
上传者:
提交:1
通过:0
题目描述
binarycopycode is terrible at math. He always ask locytus for help but after their retirement, they went to different universities for their graduate studies. So binarycopycode have to seek help from you.
We define f(x) equals to the number of distinct digits in the decimal notation of x . Now please calculate the number of X satisfied that L≤X≤R and f(X)=A . Print this count modulo 109+7.
输入格式
First line is n(1≤n≤200,000) which indicate that L and R both have exactly n digits.
Next 2 lines is L and R , it is guaranteed that there are no leading zeros in L and R.
The last line contains 1 integers A (1≤A≤10).
输出格式
Print the number of pairs modulo 109+7.