给定两个正整数p和q,其中p不超过10^100,q不超过100000,求p除以q的商和余数
#include<iostream>
using namespace std;
int p[100];
int n, i, q,rest;
char c;
int main()
{
cin >> n;
for (i = 0; i < n; i++)
{
cin >> c;
p[i] = c-'0';
}
cin >> q;
rest=_____(1)_____;
i = 1;
while (_____(2)_____&& i < n)
{
rest = rest * 10 + p[i];
i++;
}
if (rest < q)
cout << 0 <<endl;
else
{
cout << ____(3)______;
while (i < n)
{
rest = _____(4)______;
i++;
cout<< rest / q;
}
cout << endl;
}
cout << ______(5)_______<< endl;
return 0;
}