미완성 - 돌아가는지 모름
class BigInteger {
public:
static const LL CIPHER = 1e18;
LL high;
LL low;
BigInteger() {
high = 0;
low = 0;
}
BigInteger(LL value) {
high = 0;
low = value;
}
BigInteger(LL high, LL low) {
high = high;
low = low;
}
BigInteger operator+(BigInteger& other) {
LL tlow = this->low % CIPHER + other.low % CIPHER;
LL thigh = 0;
if (tlow % CIPHER != this->low + other.low) {
thigh = this->low / CIPHER + other.low / CIPHER;
}
thigh += this->high + other.high;
return BigInteger(thigh, tlow);
}
};