#include #include #include #define ANS (1000000+3) int main(void) { char x,n,g,h,i,j; int a,tmp,ans=0; scanf("%hhd %hhd",&x,&n); for (i=0;i