进食厚仁(if you 60pts WA on #13~20)
查看原帖
进食厚仁(if you 60pts WA on #13~20)
728614
dingxiongyue楼主2024/12/5 17:23

请检查你的代码中有没有:

ans = (ans - quick_pow(v, x)) % mod;

请将它改为:

ans = (ans - quick_pow(v, x) + mod) % mod;

因为不加 modmod 的话 ansans 可能会变成一个负数

2024/12/5 17:23
加载中...