#chokudaiS001g. [chokudai_S001_g]あまり

[chokudai_S001_g]あまり

配点 : 300300

問題文

数列 aa を連結させた整数を、 1,000,000,0071,000,000,007 で割った余りを求めなさい。

制約

  • 1leqNleq100,0001 \\leq N \\leq 100,000

Sample Input 1

5
3 1 5 4 2

Sample Output 1

31542

Sample Input 2

6
1 2 3 4 5 6

Sample Output 2

123456

Sample Input 3

7
7 6 5 4 3 2 1

Sample Output 3

7654321

Sample Input 4

20
19 11 10 7 8 9 17 18 20 4 3 15 16 1 5 14 6 2 13 12

Sample Output 4

370453866