高精度除以低精度
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
//b存商,r为余数
vector<int> div(vector<int> &a, int &b, int &r){
vector<int> c;
r = 0;
for(int i = a.size() - 1; i >= 0; i -- ){
r = r * 10 + a[i];
c.push_back(r / b);
r %= b;
}
reverse(c.begin(), c.end());
while(c.size() > 1 && c.back() == 0) c.pop_back();
// cout << c.back() << endl;
return c;
}
int main(){
string x;
int b, r;
cin >> x >> b;
vector<int> a, c;
for(int i = x.size() - 1; i >= 0; i -- ) a.push_back(x[i] - '0');
c = div(a, b, r);
for(int i = c.size() - 1; i >= 0; i -- ) printf("%d", c[i]);
cout << endl << r;
return 0;
}