upd: first complete version

This commit is contained in:
2023-10-31 00:07:15 +08:00
parent 81eeb3281f
commit 4b6a21eb76

View File

@ -595,12 +595,17 @@ int2048 operator/(int2048 A, const int2048 &B) {
return std::move(A);
}
int2048 &int2048::operator%=(const int2048 &) {
int2048 &int2048::operator%=(const int2048 &B) {
// 实现复合取模逻辑
int2048 C=(*this)/B;
*this=*this-C*B;
return *this;
}
int2048 operator%(int2048, const int2048 &) {
int2048 operator%(int2048 A, const int2048 &B) {
// 实现取模逻辑
int2048 C=A/B;
return A-C*B;
}
std::istream &operator>>(std::istream &stream, int2048 &V) {