#include<iostream>
#include<vector>
#include<string>
#define max(x,y) (x>y? x:y)
using namespace std;
const int BASE = 1e4;
const int WIDTH = 4;
#pragma warning(disable:4996)
struct BigInteger {
int flag = 1;//代表正负
vector<int> s;
BigInteger(long long int num = 0) { *this = num; }
BigInteger operator=(long long int num) {
s.clear();
do {
s.push_back(num%BASE);
num /= BASE;
} while (num);
return *this;
}
BigInteger operator=(const string& str) {
s.clear();
int x, len = (str.length() - 1) / WIDTH + 1;
for (int i = 0; i < len; ++i) {
BigInteger大整数类的加、减、乘、输入、输出
最新推荐文章于 2023-05-20 21:17:05 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)