更新时间:2018-11-22 15:55作者:王华老师
result[i] = 0;
else
{
int k = i;
while(k < 128 && result[k] == 0)
{
result[k] = 1;
++k;
}
if(k != 128)
result[k] = 0;
}
}
}
return result;
}
friend int128 operator*(int128 const& i1,int128 const& i2)
{
if(i1==0 || i2==0)
return int128();
if(i1==1)
return i2;
if(i2==1)
return i1;
int128 acc=int128();
for(int i=0;i<128;++i)
{
if(i2[i]==1)
{
acc=acc+(i1<
}
}
return acc;
}
friend int128 operator/(int128 const& i1,int128 const& i2)
{
if(i1 < i2)
return int128();
deque de;
bool flag = 0;
for(int i = 127 ; i >= 0 ; --i)
{
if(flag == 0 && i1[i] == 0) {}
else
{