我的程序问题真多
改了好多
终于AC了
```cpp
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
bool first;
int main()
{
char a[5001];
int b,i=0,len,w=0,R=-1;
scanf("%s",a);
scanf("%d",&b);
len=strlen(a);
while(i<len)
{
if(w>=b)
{
first=1;
printf("%d",w/b);
w=w%b;
R=i-1;
}
else if(first) printf("0");
w=w*10+(a[i]-'0');
i++;
}
if(w>=b)
{
printf("%d",w/b);
first=1;
w=w%b;
R=len-1;
}
else if(first&&w>0) printf("0");
if(a[len-1]=='0'&&R< len-1) printf("0");
return 0;
}
```
by resftlmuttmotw @ 2018-11-09 18:38:21