logo AlgoBeat OnlineJudge
登录 注册

#210160. 233 Matrix

内存限制:512 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

In our daily life we often use 233 to express our feelings. Actually, we may say 2333, 23333, or 233333 ... in the same meaning. And here is the question: Suppose we have a matrix called 233 matrix. In the first line, it would be 233, 2333, 23333... (it means , , ...) Besides, in 233 matrix, we got . Now you have known , could you tell me in the 233 matrix?

输入格式

There are multiple test cases. Please process till EOF.

For each case, the first line contains two postive integers . The second line contains n integers, ().

输出格式

For each case, output mod 10000007.

样例

样例输入 1

1 1
1
2 2
0 0
3 7
23 47 16

样例输出 1

234
2799
72937

数据范围与提示