不知道为什么我为什么赞收不到
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
string str;
char ch[16]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
if(a2){
if(b!=0){
while(b!=0){
int c=b%a;
str+=ch[c];
b/=a;
}
reverse(str.begin(),str.end());
}else str=str+ch[b];
str="0b"+str;
}
else if(a8){
if(b!=0){
while(b!=0){
int c=b%a;
str=str+ch[c];
b=b/a;
}
reverse(str.begin(),str.end());
}else str=str+ch[b];
str="0"+str;
}
else if(a==16){
if(b!=0){
while(b!=0){
int c=b%a;
str=str+ch[c];
b=b/a;
}
reverse(str.begin(),str.end());
}else str=str+ch[b];
str="0x"+str;
}
cout<<str;
return 0;
}