IntPair div(std::vector<char> sum, char sourc, char objec) {//大数除法,结果存储在shang中
int object = char_to_num(objec);
int source = char_to_num(sourc);
int decimal_num = 0;
IntPair re;
for (int i = 0; i < sum.size(); i = i + 1)
{
decimal_num = decimal_num * source + char_to_num(sum[i]);
re.v1.push_back(num_to_char(decimal_num / object));
decimal_num = decimal_num % object;
}
re.v2.push_back(num_to_char(decimal_num));
return re;
}
12-24
3846
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
10-24
3230
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
02-05
376
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
12-25
2631
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)