GCC编译器将__int64转为long long即可 int ModPow(__int64 a,__int64 k,__int64 m) { __int64 b=1; while(k>=1) { if(k%2==1) b=a*b%m; a=a*a%m; k=k/2; } return b; }