因为全wa了 所以就下载了测试点一的数据 运行后发现结果是对的 但是这个代码交上去就是0
#include<iostream>
using namespace std;
#define ll long long
ll b,a;
ll zj,p=1;
string ans=" ";
char to(int t)
{
if(t>=10)return char(t-10+'A');
return char(t+'0');
}
int main()
{
cin>>zj>>b;
a=zj;
while(zj)
{
int d=zj%b;
if(d<0)
{
d-=b;
ans=to(d)+ans;
zj/=b;
zj+=1;
}
else {
ans=to(d)+ans;
zj/=b;
}
}
cout<<a<<"="<<ans<<"(base"<<b<<")"<<endl;
}