https://www.luogu.com.cn/record/143357696
#include<bits/stdc++.h>
using namespace std;
int top=-1,stk[109];
int main()
{
int n,a;
cin>>n>>a;
while(n>0){
top++;
stk[top]=n%a;
n/=a;
}
while(top>=0){
if(stk[top]<10){
cout<<stk[top];
top--;
}
else{
cout<<char(stk[top]-10+'A');
}
}
}
还有,蒟蒻没懂
cout<<char(stk[top]-10+'A');
的含义