#include#include using namespace std;const int maxn=2e7;int len,base,myhash[300],ans=0;bool vis[17001005];char s[maxn];int main(){ memset(vis,0,sizeof(bool)*16000005); scanf("%d%d%s",&len,&base,s); int base1=base; //把字符串转换为base进制的数 int I=strlen(s); for(int i=0;i