while (b != 0) { if (b % 2 != 0) ans = ans * a % p; a = a * a % p; b = b/2; } 给你三个整数 a,b,p,求 abmodp。 文章导航 string相关高精度加法函数