ll p;
ll kmul(ll a,ll b)
{
ll ans=0;
for(;b;)
{
if(b&1) ans=(ans+a)%p;
a<<=1;
a%=p;
b>>=1;
}
return ans%p;
}
时间: 2024-10-10 05:58:49
ll p;
ll kmul(ll a,ll b)
{
ll ans=0;
for(;b;)
{
if(b&1) ans=(ans+a)%p;
a<<=1;
a%=p;
b>>=1;
}
return ans%p;
}