高精*单精(函数)

· · 个人记录

void mul(HP &Z,HP a,int b)
{
     Z.len=a.len;
     int x=0;
     for(int i=1;i<=Z.len;i++)
     {
         Z.p[i]=a.p[i]*b+x;
         Z=c.p[i]/mod;
         Z.p[i]%=mod;
     }
     while(x>0)
         Z.p[++Z.len]=x%mod,x/=mod;
}