#Lutece2179. 子串

子串

Migrated from Lutece 2179 子串

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

给出长度为nn的数字串,请求出其中能被kk整除的子串个数。

Input

第一行有22个正整数nnkk,含义如题目所示。

第二行为一个长度为nn的仅由090\sim 9组成的字符串。

Output

输出一个整数表示能被kk整除的子串个数。

Samples

5 3
12674
4

Constraints

n*k≤2e7

Note

样例解释:

共有四个合法的串12,126,267,612,126,267,6

虽然24,27,17424,27,174也能被33整除,但在原串中的位置不连续,所以不合法。

有前导零的数字串也合法

Resources

2019 UESTC ACM Training for Dynamic Programming