// by zzq
inline LL Mul(LL a,LL b,LL mod){
LL tmp=a*b-(LL)((long double)a/mod*b+0.5)*mod; tmp%=mod;
return tmp<0?tmp+mod:tmp;
}
转载于:https://www.cnblogs.com/ac-evil/p/11615527.html
// by zzq
inline LL Mul(LL a,LL b,LL mod){
LL tmp=a*b-(LL)((long double)a/mod*b+0.5)*mod; tmp%=mod;
return tmp<0?tmp+mod:tmp;
}
转载于:https://www.cnblogs.com/ac-evil/p/11615527.html