Modern Cpp读入a, b, c, d, p,结论就是计算pow(a * b, c * d)对p取模的结果,假设指数部分相乘不会爆__int128,使用快速幂配合龟速乘解决。 #include <iostream> #include <string> #include <algorithm> using i64 = long long; using i128 = __int128; std::ostream& operator<<(std::ostream& os, i128 n) { if (n == 0) { retur...