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