#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 =
BigInteger大整数类的加、减、乘、输入、输出
最新推荐文章于 2025-05-31 16:10:35 发布