📅  最后修改于: 2022-03-11 14:44:46.495000             🧑  作者: Mango
long long mul(long long a, long long b){
if(b == 0)
return 0;
if(b & 1)
return (mul(a, b - 1) + a) % mod;
long long half = mul(a, b >> 1);
return (half + half) % mod;
}
/* Credits tr0j4n034 at github as solution of MAS from spoj*/