#BZOJ4421. Digit Division
Digit Division
题目描述
给出一个数字串,现将其分成一个或多个子串,要求分出来的每个子串能Mod M等于0.
将方案数(mod 10^9+7)
输入格式
给出N,M,其中1<=N<=300 000,1<=M<=1000 000.
接下来一行,一个数字串,长度为N。
输出格式
如题
4 2
1246
4
如题
4 2
1246
4
By signing up a 蒙青创OJ universal account, you can submit code and join discussions in all online judging services provided by us.