当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

5519:Kykneion asma

题目描述
On the last day before the famous mathematician Swan's death, he left a problem to the world: Given integers $n$ and $a_i$ for $0\leq i \leq 4$, calculate the number of $n$-digit integers which have at most $a_i$-digit $i$ in its decimal representation (and have no $5,6,7,8$ or $9$). Leading zeros are not allowed in this problem.
输入解释
There is one integer $T~(1<T\le 10)$ in the beginning of input, which means that you need to process $T$ test cases. In each test case, there is one line containing six integers representing $n$ and $a_0$ to $a_4$, where $2\leq n\leq 15000$ and $0\leq a_i\leq 30000$.
输出解释
For each test case, you should print first the identifier of the test case and then the answer to the problem, module $10^9+7$.
输入样例
10
5 0 1 2 3 4
5 1 1 1 1 1
5 2 2 2 2 2
5 3 3 3 3 3
5 3 2 1 3 2
5 3 2 0 0 0
5 0 0 0 5 0
7000 41 2467 6334 2500 3169
7000 7724 3478 5358 2962 464
7000 5705 4145 7281 827 1961
输出样例
Case #1: 535
Case #2: 96
Case #3: 1776
Case #4: 2416
Case #5: 1460
Case #6: 4
Case #7: 1
Case #8: 459640029
Case #9: 791187801
Case #10: 526649529
来自杭电HDUOJ的附加信息
Recommend wange2014

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-5519

最后修改于 2020-10-25T23:23:23+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
12000/6000MS(Java/Others) 65536/65536K(Java/Others)