root(N,k)=root(Nd,k);其中Nd=N%(k-1) #include<iostream> using namespace std; #include<algorithm> #include<cstring> #include<string> const int MAX = 1024; int root(int x, int y, int k) { int res = 1; if (k <= 2)return 1; while (y != 1) { x %= k - 1; if (x == 0)return k ...