include [HTML_REMOVED]
include [HTML_REMOVED]
include [HTML_REMOVED]
using namespace std;
vector[HTML_REMOVED] Div(vector[HTML_REMOVED] X, int Y,int& t)
{
vector[HTML_REMOVED] E;
t = 0;
for (int i = X.size() - 1; i >= 0; i–)
{
t = t*10 + X[i];
E.push_back(t / Y);
t %= Y;
}
reverse(E.begin(), E.end());
while (E.size() > 1 && E.back() == 0)
E.pop_back();
return E;
}
int main()
{
string a;
int b;
int t = 0;
cin >> a >> b;
vector[HTML_REMOVED] A;
for (int i = a.size() - 1; i >= 0; i–)
A.push_back(a[i] - ‘0’);
vector<int> E = Div(A, b,t);
for (int i = E.size() - 1; i >= 0; i--)
cout << E[i];
cout << endl << t;
return 0;
}