feat: finish *

This commit is contained in:
2023-10-30 17:30:10 +08:00
parent 1e543b6a7b
commit b158fddf2e
2 changed files with 18 additions and 8 deletions

View File

@ -430,7 +430,7 @@ int2048 &int2048::Multiply(const int2048 &B) {
// 实现复合乘法逻辑
const int2048 *pB = &B;
if (this == &B) pB = new int2048(B);
if ((this->num_length == 1 && this->val[0]) ||
if ((this->num_length == 1 && this->val[0] == 0) ||
(pB->num_length == 1 && pB->val[0] == 0)) {
*this = std::move(int2048(0));
return *this;
@ -542,4 +542,4 @@ bool operator>=(const int2048 &A, const int2048 &B) {
else
return cmp <= 0;
}
} // namespace sjtu
} // namespace sjtu