hihoCoder #1430 : A Boring Problem(一琐繁题)
时间限制:1000ms
单点时限:1000ms
内存限制:256MB
Description - 题目描述
As a student of the school of electronics engineering and computer science in Peking University, Kyle took the course named Advanced Algebra in his freshman year, which, unluckily, became his nightmare.
His teacher, Mr. X, has an approximately paranoid requirements in the ability of calculation, from which his students suffer a lot.
One day, Mr. X got a whim that he wanted to know for a given integer k and a long numeric string S whose length is N, what is the result of for each i(1 ≤ i ≤ N), where
. S[L] means the Lth digit in S, and L starts from 1.
Mr. X added the problem to the midterm test. Please give a hand to Kyle and tell him the answer mod 1000000007.
作为北大信息科学技术学院的学生,Kyle曾经不知何为噩梦直到大一时候上了一门叫高等代数的课。 他的老师,Mr. X,对计算能力有着丧心病狂的要求。学生们饱受其害。 一天,Mr. X突发奇想,一个整数k与一个长度为N的数字串S,对于每个i(1 ≤ i ≤ N) 式子Σi j=1F(j, i)的结果是什么?这里F(j, i)=(Σi L=j S[L])^k。S[L]表示S的第L个数,L从1开始。 Mr. X把这道题放到了期中考试里。快帮帮Kyle 并告诉他模1000000007后的答案。