#include <stdio.h>#include <stdlib.h>#include <string.h>#include<ctype.h>#include "function.h"void solver(char **ptr, int *n, int P, char *M){int put[1010]={0};int i=0, a, f=0;while(M[i]!='\0'){if(isdigit(M[i])){if(f==0){a=M[i]-'0';}if(f==1){a=a*10+(M[i]-'0');}f=1;}else{a=a%P;if(*ptr[a]=='\0')*n=*n+1;// ptr[a][put[a]]=M[i];*(ptr[a]+put[a])=M[i];put[a]=put[a]+1;f=0;}i++;}}